Skip to content

Commit d8451bc

Browse files
committed
TYP: positional-only __class_getitem__ parameters
1 parent ecf2e07 commit d8451bc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

numpy/__init__.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ class dtype(Generic[_DTypeScalar_co]):
815815
metadata: dict[builtins.str, Any] = ...,
816816
) -> dtype[object_]: ...
817817

818-
def __class_getitem__(self, item: Any) -> GenericAlias: ...
818+
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
819819

820820
@overload
821821
def __getitem__(self: dtype[void], key: list[builtins.str], /) -> dtype[void]: ...
@@ -1466,7 +1466,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]):
14661466
if sys.version_info >= (3, 12):
14671467
def __buffer__(self, flags: int, /) -> memoryview: ...
14681468

1469-
def __class_getitem__(self, item: Any) -> GenericAlias: ...
1469+
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
14701470

14711471
@overload
14721472
def __array__(
@@ -2767,7 +2767,7 @@ class number(generic, Generic[_NBit1]): # type: ignore
27672767
def real(self: _ArraySelf) -> _ArraySelf: ...
27682768
@property
27692769
def imag(self: _ArraySelf) -> _ArraySelf: ...
2770-
def __class_getitem__(self, item: Any) -> GenericAlias: ...
2770+
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
27712771
def __int__(self) -> int: ...
27722772
def __float__(self) -> float: ...
27732773
def __complex__(self) -> complex: ...

0 commit comments

Comments
 (0)