8000 Merge pull request #18985 from BvB93/pipe · numpy/numpy@938fe1f · GitHub
[go: up one dir, main page]

Skip to content

Commit 938fe1f

Browse files
authored
Merge pull request #18985 from BvB93/pipe
MAINT: Remove usage of the PEP 604 pipe operator
2 parents fa6dd59 + 1bb04bb commit 938fe1f

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

numpy/__init__.pyi

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,7 @@ class dtype(Generic[_DTypeScalar_co]):
10631063
@overload
10641064
def __getitem__(self: dtype[void], key: List[str]) -> dtype[void]: ...
10651065
@overload
1066-
def __getitem__(self: dtype[void], key: str | int) -> dtype[Any]: ...
1066+
def __getitem__(self: dtype[void], key: Union[str, int]) -> dtype[Any]: ...
10671067

10681068
# NOTE: In the future 1-based multiplications will also yield `void` dtypes
10691069
@overload
@@ -2566,7 +2566,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]):
25662566

25672567
# `np.generic` does not support inplace operations
25682568
@overload # type: ignore[misc]
2569-
def __iadd__(self: _ArrayND[Any], other: _NestedSequence[str | bytes]) -> NoReturn: ...
2569+
def __iadd__(self: _ArrayND[Any], other: _NestedSequence[Union[str, bytes]]) -> NoReturn: ...
25702570
@overload
25712571
def __iadd__(self: _ArrayND[bool_], other: _ArrayLikeBool_co) -> _ArrayND[bool_]: ...
25722572
@overload
@@ -2587,7 +2587,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]):
25872587
def __iadd__(self: _ArrayND[_ScalarType], other: _RecursiveSequence) -> _ArrayND[_ScalarType]: ...
25882588

25892589
@overload # type: ignore[misc]
2590-
def __isub__(self: _ArrayND[Any], other: _NestedSequence[str | bytes]) -> NoReturn: ...
2590+
def __isub__(self: _ArrayND[Any], other: _NestedSequence[Union[str, bytes]]) -> NoReturn: ...
25912591
@overload
25922592
def __isub__(self: _ArrayND[unsignedinteger[_NBit1]], other: _ArrayLikeUInt_co) -> _ArrayND[unsignedinteger[_NBit1]]: ...
25932593
@overload
@@ -2606,7 +2606,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]):
26062606
def __isub__(self: _ArrayND[_ScalarType], other: _RecursiveSequence) -> _ArrayND[_ScalarType]: ...
26072607

26082608
@overload # type: ignore[misc]
2609-
def __imul__(self: _ArrayND[Any], other: _NestedSequence[str | bytes]) -> NoReturn: ...
2609+
def __imul__(self: _ArrayND[Any], other: _NestedSequence[Union[str, bytes]]) -> NoReturn: ...
26102610
@overload
26112611
def __imul__(self: _ArrayND[bool_], other: _ArrayLikeBool_co) -> _ArrayND[bool_]: ...
26122612
@overload
@@ -2625,7 +2625,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]):
26252625
def __imul__(self: _ArrayND[_ScalarType], other: _RecursiveSequence) -> _ArrayND[_ScalarType]: ...
26262626

26272627
@overload # type: ignore[misc]
2628-
def __itruediv__(self: _ArrayND[Any], other: _NestedSequence[str | bytes]) -> NoReturn: ...
2628+
def __itruediv__(self: _ArrayND[Any], other: _NestedSequence[Union[str, bytes]]) -> NoReturn: ...
26292629
@overload
26302630
def __itruediv__(self: _ArrayND[floating[_NBit1]], other: _ArrayLikeFloat_co) -> _ArrayND[floating[_NBit1]]: ...
26312631
@overload
@@ -2640,7 +2640,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]):
26402640
def __itruediv__(self: _ArrayND[_ScalarType], other: _RecursiveSequence) -> _ArrayND[_ScalarType]: ...
2641 8000 2641

26422642
@overload # type: ignore[misc]
2643-
def __ifloordiv__(self: _ArrayND[Any], other: _NestedSequence[str | bytes]) -> NoReturn: ...
2643+
def __ifloordiv__(self: _ArrayND[Any], other: _NestedSequence[Union[str, bytes]]) -> NoReturn: ...
26442644
@overload
26452645
def __ifloordiv__(self: _ArrayND[unsignedinteger[_NBit1]], other: _ArrayLikeUInt_co) -> _ArrayND[unsignedinteger[_NBit1]]: ...
26462646
@overload
@@ -2659,7 +2659,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]):
26592659
def __ifloordiv__(self: _ArrayND[_ScalarType], other: _RecursiveSequence) -> _ArrayND[_ScalarType]: ...
26602660

26612661
@overload # type: ignore[misc]
2662-
def __ipow__(self: _ArrayND[Any], other: _NestedSequence[str | bytes]) -> NoReturn: ...
2662+
def __ipow__(self: _ArrayND[Any], other: _NestedSequence[Union[str, bytes]]) -> NoReturn: ...
26632663
@overload
26642664
def __ipow__(self: _ArrayND[unsignedinteger[_NBit1]], other: _ArrayLikeUInt_co) -> _ArrayND[unsignedinteger[_NBit1]]: ...
26652665
@overload
@@ -2674,7 +2674,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]):
26742674
def __ipow__(self: _ArrayND[_ScalarType], other: _RecursiveSequence) -> _ArrayND[_ScalarType]: ...
26752675

26762676
@overload # type: ignore[misc]
2677-
def __imod__(self: _ArrayND[Any], other: _NestedSequence[str | bytes]) -> NoReturn: ...
2677+
def __imod__(self: _ArrayND[Any], other: _NestedSequence[Union[str, bytes]]) -> NoReturn: ...
26782678
@overload
26792679
def __imod__(self: _ArrayND[unsignedinteger[_NBit1]], other: _ArrayLikeUInt_co) -> _ArrayND[unsignedinteger[_NBit1]]: ...
26802680
@overload
@@ -2689,7 +2689,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]):
26892689
def __imod__(self: _ArrayND[_ScalarType], other: _RecursiveSequence) -> _ArrayND[_ScalarType]: ...
26902690

26912691
@overload # type: ignore[misc]
2692-
def __ilshift__(self: _ArrayND[Any], other: _NestedSequence[str | bytes]) -> NoReturn: ...
2692+
def __ilshift__(self: _ArrayND[Any], other: _NestedSequence[Union[str, bytes]]) -> NoReturn: ...
26932693
@overload
26942694
def __ilshift__(self: _ArrayND[unsignedinteger[_NBit1]], other: _ArrayLikeUInt_co) -> _ArrayND[unsignedinteger[_NBit1]]: ...
26952695
@overload
@@ -2700,7 +2700,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]):
27002700
def __ilshift__(self: _ArrayND[_ScalarType], other: _RecursiveSequence) -> _ArrayND[_ScalarType]: ...
27012701

27022702
@overload # type: ignore[misc]
2703-
def __irshift__(self: _ArrayND[Any], other: _NestedSequence[str | bytes]) -> NoReturn: ...
2703+
def __irshift__(self: _ArrayND[Any], other: _NestedSequence[Union[str, bytes]]) -> NoReturn: ...
27042704
@overload
27052705
def __irshift__(self: _ArrayND[unsignedinteger[_NBit1]], other: _ArrayLikeUInt_co) -> _ArrayND[unsignedinteger[_NBit1]]: ...
27062706
@overload
@@ -2711,7 +2711,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]):
27112711
def __irshift__(self: _ArrayND[_ScalarType], other: _RecursiveSequence) -> _ArrayND[_ScalarType]: ...
27122712

27132713
@overload # type: ignore[misc]
2714-
def __iand__(self: _ArrayND[Any], other: _NestedSequence[str | bytes]) -> NoReturn: ...
2714+
def __iand__(self: _ArrayND[Any], other: _NestedSequence[Union[str, bytes]]) -> NoReturn: ...
27152715
@overload
27162716
def __iand__(self: _ArrayND[bool_], other: _ArrayLikeBool_co) -> _ArrayND[bool_]: ...
27172717
@overload
@@ -2724,7 +2724,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]):
27242724
def __iand__(self: _ArrayND[_ScalarType], other: _RecursiveSequence) -> _ArrayND[_ScalarType]: ...
27252725

27262726
@overload # type: ignore[misc]
2727-
def __ixor__(self: _ArrayND[Any], other: _NestedSequence[str | bytes]) -> NoReturn: ...
2727+
def __ixor__(self: _ArrayND[Any], other: _NestedSequence[Union[str, bytes]]) -> NoReturn: ...
27282728
@overload
27292729
def __ixor__(self: _ArrayND[bool_], other: _ArrayLikeBool_co) -> _ArrayND[bool_]: ...
27302730
@overload
@@ -2737,7 +2737,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]):
27372737
def __ixor__(self: _ArrayND[_ScalarType], other: _RecursiveSequence) -> _ArrayND[_ScalarType]: ...
27382738

27392739
@overload # type: ignore[misc]
2740-
def __ior__(self: _ArrayND[Any], other: _NestedSequence[str | bytes]) -> NoReturn: ...
2740+
def __ior__(self: _ArrayND[Any], other: _NestedSequence[Union[str, bytes]]) -> NoReturn: ...
27412741
@overload
27422742
def __ior__(self: _ArrayND[bool_], other: _ArrayLikeBool_co) -> _ArrayND[bool_]: ...
27432743
@overload

0 commit comments

Comments
 (0)
0