From b7acc6f5521e0e24aeaa1aac33e31d376d75fbfb Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Tue, 23 Mar 2021 14:15:34 -0400 Subject: [PATCH] fix(types): allow running from Python 3.7, part 2 --- src/boost_histogram/_core/axis/__init__.pyi | 16 ++++++++-------- src/boost_histogram/_core/axis/transform.pyi | 12 ++++++------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/boost_histogram/_core/axis/__init__.pyi b/src/boost_histogram/_core/axis/__init__.pyi index b1006fc24..5947ee9b3 100644 --- a/src/boost_histogram/_core/axis/__init__.pyi +++ b/src/boost_histogram/_core/axis/__init__.pyi @@ -39,13 +39,13 @@ class _BaseAxis: def centers(self) -> np.ndarray: ... @property def widths(self) -> np.ndarray: ... - def index(self, value: ArrayLike, /) -> int | np.ndarray: ... - def value(self, index: ArrayLike, /) -> float | np.ndarray: ... + def index(self, arg0: ArrayLike) -> int | np.ndarray: ... + def value(self, arg0: ArrayLike) -> float | np.ndarray: ... class _BaseRegular(_BaseAxis): def __init__(self, bins: int, start: float, stop: float) -> None: ... def __iter__(self) -> Iterator[tuple[float, float]]: ... - def bin(self, i: int, /) -> tuple[float, float]: ... + def bin(self, arg0: int) -> tuple[float, float]: ... class regular_none(_BaseRegular): ... class regular_uflow(_BaseRegular): ... @@ -70,7 +70,7 @@ class regular_trans(_BaseRegular): class _BaseVariable(_BaseAxis): def __init__(self, edges: Iterable[float]) -> None: ... def __iter__(self) -> Iterator[tuple[float, float]]: ... - def bin(self, i: int, /) -> tuple[float, float]: ... + def bin(self, arg0: int) -> tuple[float, float]: ... class variable_none(_BaseVariable): ... class variable_uflow(_BaseVariable): ... @@ -82,7 +82,7 @@ class variable_circular(_BaseVariable): ... class _BaseInteger(_BaseAxis): def __init__(self, start: int, stop: int) -> None: ... def __iter__(self) -> Iterator[int]: ... - def bin(self, i: int, /) -> int: ... + def bin(self, arg0: int) -> int: ... class integer_none(_BaseInteger): ... class integer_uflow(_BaseInteger): ... @@ -94,7 +94,7 @@ class integer_circular(_BaseInteger): ... class _BaseCatInt(_BaseAxis): def __init__(self, categories: Iterable[int]) -> None: ... def __iter__(self) -> Iterator[int]: ... - def bin(self, i: int, /) -> int: ... + def bin(self, arg0: int) -> int: ... class category_int(_BaseCatInt): ... class category_int_growth(_BaseCatInt): ... @@ -102,11 +102,11 @@ class category_int_growth(_BaseCatInt): ... class _BaseCatStr(_BaseAxis): def __init__(self, categories: Iterable[str]) -> None: ... def __iter__(self) -> Iterator[str]: ... - def bin(self, i: int, /) -> str: ... + def bin(self, arg0: int) -> str: ... class category_str(_BaseCatStr): ... class category_str_growth(_BaseCatStr): ... class boolean(_BaseAxis): def __iter__(self) -> Iterator[int]: ... - def bin(self, i: int, /) -> int: ... + def bin(self, arg0: int) -> int: ... diff --git a/src/boost_histogram/_core/axis/transform.pyi b/src/boost_histogram/_core/axis/transform.pyi index afda009e4..ffec7d63b 100644 --- a/src/boost_histogram/_core/axis/transform.pyi +++ b/src/boost_histogram/_core/axis/transform.pyi @@ -2,14 +2,14 @@ from typing import Any, Callable, TypeVar T = TypeVar("T", bound="_BaseTransform") -def _log_fn(v: float, /) -> float: ... -def _exp_fn(v: float, /) -> float: ... -def _sqrt_fn(v: float, /) -> float: ... -def _sq_fn(v: float, /) -> float: ... +def _log_fn(arg0: float) -> float: ... +def _exp_fn(arg0: float) -> float: ... +def _sqrt_fn(arg0: float) -> float: ... +def _sq_fn(arg0: float) -> float: ... class _BaseTransform: - def forward(self, value: float, /) -> float: ... - def reverse(self, value: float, /) -> float: ... + def forward(self, arg0: float) -> float: ... + def reverse(self, arg0: float) -> float: ... def __repr__(self) -> str: ... def __copy__(self: T) -> T: ... def __deepcopy__(self: T, memo: Any) -> T: ...