Skip to content

Commit 246075b

Browse files
authored
fix(types): allow running from Python 3.7, part 2 (#545)
1 parent 67b96f0 commit 246075b

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

src/boost_histogram/_core/axis/__init__.pyi

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ class _BaseAxis:
3939
def centers(self) -> np.ndarray: ...
4040
@property
4141
def widths(self) -> np.ndarray: ...
42-
def index(self, value: ArrayLike, /) -> int | np.ndarray: ...
43-
def value(self, index: ArrayLike, /) -> float | np.ndarray: ...
42+
def index(self, arg0: ArrayLike) -> int | np.ndarray: ...
43+
def value(self, arg0: ArrayLike) -> float | np.ndarray: ...
4444

4545
class _BaseRegular(_BaseAxis):
4646
def __init__(self, bins: int, start: float, stop: float) -> None: ...
4747
def __iter__(self) -> Iterator[tuple[float, float]]: ...
48-
def bin(self, i: int, /) -> tuple[float, float]: ...
48+
def bin(self, arg0: int) -> tuple[float, float]: ...
4949

5050
class regular_none(_BaseRegular): ...
5151
class regular_uflow(_BaseRegular): ...
@@ -70,7 +70,7 @@ class regular_trans(_BaseRegular):
7070
class _BaseVariable(_BaseAxis):
7171
def __init__(self, edges: Iterable[float]) -> None: ...
7272
def __iter__(self) -> Iterator[tuple[float, float]]: ...
73-
def bin(self, i: int, /) -> tuple[float, float]: ...
73+
def bin(self, arg0: int) -> tuple[float, float]: ...
7474

7575
class variable_none(_BaseVariable): ...
7676
class variable_uflow(_BaseVariable): ...
@@ -82,7 +82,7 @@ class variable_circular(_BaseVariable): ...
8282
class _BaseInteger(_BaseAxis):
8383
def __init__(self, start: int, stop: int) -> None: ...
8484
def __iter__(self) -> Iterator[int]: ...
85-
def bin(self, i: int, /) -> int: ...
85+
def bin(self, arg0: int) -> int: ...
8686

8787
class integer_none(_BaseInteger): ...
8888
class integer_uflow(_BaseInteger): ...
@@ -94,19 +94,19 @@ class integer_circular(_BaseInteger): ...
9494
class _BaseCatInt(_BaseAxis):
9595
def __init__(self, categories: Iterable[int]) -> None: ...
9696
def __iter__(self) -> Iterator[int]: ...
97-
def bin(self, i: int, /) -> int: ...
97+
def bin(self, arg0: int) -> int: ...
9898

9999
class category_int(_BaseCatInt): ...
100100
class category_int_growth(_BaseCatInt): ...
101101

102102
class _BaseCatStr(_BaseAxis):
103103
def __init__(self, categories: Iterable[str]) -> None: ...
104104
def __iter__(self) -> Iterator[str]: ...
105-
def bin(self, i: int, /) -> str: ...
105+
def bin(self, arg0: int) -> str: ...
106106

107107
class category_str(_BaseCatStr): ...
108108
class category_str_growth(_BaseCatStr): ...
109109

110110
class boolean(_BaseAxis):
111111
def __iter__(self) -> Iterator[int]: ...
112-
def bin(self, i: int, /) -> int: ...
112+
def bin(self, arg0: int) -> int: ...

src/boost_histogram/_core/axis/transform.pyi

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ from typing import Any, Callable, TypeVar
22

33
T = TypeVar("T", bound="_BaseTransform")
44

5-
def _log_fn(v: float, /) -> float: ...
6-
def _exp_fn(v: float, /) -> float: ...
7-
def _sqrt_fn(v: float, /) -> float: ...
8-
def _sq_fn(v: float, /) -> float: ...
5+
def _log_fn(arg0: float) -> float: ...
6+
def _exp_fn(arg0: float) -> float: ...
7+
def _sqrt_fn(arg0: float) -> float: ...
8+
def _sq_fn(arg0: float) -> float: ...
99

1010
class _BaseTransform:
11-
def forward(self, value: float, /) -> float: ...
12-
def reverse(self, value: float, /) -> float: ...
11+
def forward(self, arg0: float) -> float: ...
12+
def reverse(self, arg0: float) -> float: ...
1313
def __repr__(self) -> str: ...
1414
def __copy__(self: T) -> T: ...
1515
def __deepcopy__(self: T, memo: Any) -> T: ...

0 commit comments

Comments
 (0)