@@ -7,8 +7,6 @@ import sys
7
7
from _typeshed import Incomplete , StrOrBytesPath , SupportsFlush , SupportsLenAndGetItem , SupportsWrite
8
8
from builtins import bool as py_bool
9
9
from collections .abc import Callable , Iterable , Iterator , Mapping , Sequence
10
- from decimal import Decimal
11
- from fractions import Fraction
12
10
from types import EllipsisType , GenericAlias , GetSetDescriptorType , MappingProxyType , ModuleType
13
11
from typing import (
14
12
Any ,
@@ -694,64 +692,6 @@ _SubModule: TypeAlias = L[
694
692
"testing" ,
695
693
"typing" ,
696
694
]
697
- _ExpiredAttribute : TypeAlias = L [
698
- "DataSource" ,
699
- "Inf" ,
700
- "Infinity" ,
701
- "NINF" ,
702
- "NZERO" ,
703
- "NaN" ,
704
- "PINF" ,
705
- "PZERO" ,
706
- "add_docstring" ,
707
- "add_newdoc" ,
708
- "add_newdoc_ufunc" ,
709
- "alltrue" ,
710
- "asfarray" ,
711
- "byte_bounds" ,
712
- "cast" ,
713
- "cfloat" ,
714
- "clongfloat" ,
715
- "compare_chararrays" ,
716
- "compat" ,
717
- "complex_" ,
718
- "deprecate" ,
719
- "deprecate_with_doc" ,
720
- "disp" ,
721
- "fastCopyAndTranspose" ,
722
- "find_common_type" ,
723
- "float_" ,
724
- "format_parser" ,
725
- "get_array_wrap" ,
726
- "geterrobj" ,
727
- "infty" ,
728
- "issctype" ,
729
- "issubclass_" ,
730
- "issubsctype" ,
731
- "longcomplex" ,
732
- "longfloat" ,
733
- "lookfor" ,
734
- "mat" ,
735
- "maximum_sctype" ,
736
- "nbytes" ,
737
- "obj2sctype" ,
738
- "recfromcsv" ,
739
- "recfromtxt" ,
740
- "round_" ,
741
- "safe_eval" ,
742
- "sctype2char" ,
743
- "sctypes" ,
744
- "set_numeric_ops" ,
745
- "set_string_function" ,
746
- "seterrobj" ,
747
- "singlecomplex" ,
748
- "sometrue" ,
749
- "source" ,
750
- "string_" ,
751
- "tracemalloc_domain" ,
752
- "unicode_" ,
753
- "who" ,
754
- ]
755
695
_UFuncMethod : TypeAlias = L ["__call__" , "reduce" , "reduceat" , "accumulate" , "outer" , "at" ]
756
696
757
697
_2Tuple : TypeAlias = tuple [_T , _T ]
@@ -769,12 +709,10 @@ _JustBuiltinScalar: TypeAlias = int | _nt.JustFloat | _nt.JustComplex | _nt.Just
769
709
770
710
_AbstractInexact : TypeAlias = _JustInexact | _JustFloating | _JustComplexFloating
771
711
_AbstractInteger : TypeAlias = _JustInteger | _JustSignedInteger | _JustUnsignedInteger
772
- _AbstractNumber : TypeAlias = _JustNumber | _AbstractInteger | _AbstractInexact
773
712
774
713
_int32_min : TypeAlias = int32 | int64
775
714
_int16_min : TypeAlias = int16 | _int32_min
776
715
_int16_max : TypeAlias = int16 | int8
777
- _int32_max : TypeAlias = int32 | _int16_max
778
716
_float32_min : TypeAlias = float32 | float64 | longdouble
779
717
_float32_max : TypeAlias = float32 | float16
780
718
_float64_max : TypeAlias = float64 | _float32_max
@@ -784,12 +722,7 @@ _integer32_min: TypeAlias = _nt.integer32 | _nt.integer64
784
722
_inexact64_min : TypeAlias = _nt .inexact64 | _nt .inexact64l
785
723
_inexact64_max : TypeAlias = _float64_max | _complex128_max
786
724
787
- _ArrayUInt_co : TypeAlias = _nt .Array [_nt .co_uint64 ]
788
- _ArrayInt_co : TypeAlias = _nt .Array [_nt .co_int64 ]
789
725
_ArrayInteger_co : TypeAlias = _nt .Array [_nt .co_integer ]
790
- _ArrayFloat64_co : TypeAlias = _nt .Array [_nt .co_float64 ]
791
- _ArrayFloat_co : TypeAlias = _nt .Array [_nt .co_float ]
792
- _ArrayComplex128_co : TypeAlias = _nt .Array [_nt .co_complex128 ]
793
726
_ArrayComplex_co : TypeAlias = _nt .Array [_nt .co_complex ]
794
727
_ArrayTD64_co : TypeAlias = _nt .Array [_nt .co_timedelta ]
795
728
@@ -798,21 +731,6 @@ _ToIndices: TypeAlias = _ToIndex | tuple[_ToIndex, ...]
798
731
799
732
_Axis0D : TypeAlias = L [0 , - 1 ] | tuple [()]
800
733
801
- _UnsignedIntegerCType : TypeAlias = type [
802
- ct .c_uint8 | ct .c_uint16 | ct .c_uint32 | ct .c_uint64
803
- | ct .c_ushort | ct .c_uint | ct .c_ulong | ct .c_ulonglong
804
- | ct .c_size_t | ct .c_void_p
805
- ] # fmt: skip
806
- _SignedIntegerCType : TypeAlias = type [
807
- ct .c_int8 | ct .c_int16 | ct .c_int32 | ct .c_int64
808
- | ct .c_short | ct .c_int | ct .c_long | ct .c_longlong
809
- | ct .c_ssize_t
810
- ] # fmt: skip
811
- _FloatingCType : TypeAlias = type [ct .c_float | ct .c_double | ct .c_longdouble ]
812
- _IntegerCType : TypeAlias = _UnsignedIntegerCType | _SignedIntegerCType
813
- _NumberCType : TypeAlias = _IntegerCType
814
- _GenericCType : TypeAlias = _NumberCType | type [ct .c_bool | ct .c_char | ct .py_object [Any ]]
815
-
816
734
_PyBoolND : TypeAlias = _nt .SequenceND [py_bool ]
817
735
_PyCoIntND : TypeAlias = _nt .SequenceND [int ]
818
736
_PyCoFloatND : TypeAlias = _nt .SequenceND [float ]
@@ -821,11 +739,6 @@ _PyIntND: TypeAlias = _nt.SequenceND[_nt.JustInt]
821
739
_PyFloatND : TypeAlias = _nt .SequenceND [_nt .JustFloat ]
822
740
_PyComplexND : TypeAlias = _nt .SequenceND [_nt .JustComplex ]
823
741
824
- # some commonly used builtin types that are known to result in a
825
- # `dtype[object_]`, when their *type* is passed to the `dtype` constructor
826
- # NOTE: `builtins.object` should not be included here
827
- _BuiltinObjectLike : TypeAlias = Decimal | Fraction
828
-
829
742
# can be anything, is case-insensitive, and only the first character matters
830
743
_ByteOrder : TypeAlias = L [
831
744
"S" , # swap the current order (default)
@@ -898,7 +811,7 @@ _DTypeBuiltinKind: TypeAlias = L[0, 1, 2]
898
811
_ArrayAPIVersion : TypeAlias = L ["2021.12" , "2022.12" , "2023.12" ]
899
812
_Device : TypeAlias = L ["cpu" ]
900
813
901
- _OrderCF : TypeAlias = L ["C" , "F" ] | None
814
+ _OrderCF : TypeAlias = L ["C" , "F" ] | None # noqa: PYI047
902
815
_OrderACF : TypeAlias = L ["A" , "C" , "F" ] | None
903
816
_OrderKACF : TypeAlias = L ["K" , "A" , "C" , "F" ] | None
904
817
@@ -941,7 +854,6 @@ _IntTD64Unit: TypeAlias = L[_MonthUnit, _IntTimeUnit]
941
854
_TD64Unit : TypeAlias = L [_DateUnit , _TimeUnit ]
942
855
_TimeUnitSpec : TypeAlias = _TD64UnitT | tuple [_TD64UnitT , CanIndex ]
943
856
944
- _BinOperandComplex128_co : TypeAlias = complex | float64 | _integer32_min
945
857
_ToReal : TypeAlias = float | CanComplex | CanFloat | CanIndex
946
858
_ToImag : TypeAlias = float | CanFloat | CanIndex
947
859
0 commit comments