@@ -7,8 +7,6 @@ import sys
77from _typeshed import Incomplete , StrOrBytesPath , SupportsFlush , SupportsLenAndGetItem , SupportsWrite
88from builtins import bool as py_bool
99from collections .abc import Callable , Iterable , Iterator , Mapping , Sequence
10- from decimal import Decimal
11- from fractions import Fraction
1210from types import EllipsisType , GenericAlias , GetSetDescriptorType , MappingProxyType , ModuleType
1311from typing import (
1412 Any ,
@@ -694,64 +692,6 @@ _SubModule: TypeAlias = L[
694692 "testing" ,
695693 "typing" ,
696694]
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- ]
755695_UFuncMethod : TypeAlias = L ["__call__" , "reduce" , "reduceat" , "accumulate" , "outer" , "at" ]
756696
757697_2Tuple : TypeAlias = tuple [_T , _T ]
@@ -769,12 +709,10 @@ _JustBuiltinScalar: TypeAlias = int | _nt.JustFloat | _nt.JustComplex | _nt.Just
769709
770710_AbstractInexact : TypeAlias = _JustInexact | _JustFloating | _JustComplexFloating
771711_AbstractInteger : TypeAlias = _JustInteger | _JustSignedInteger | _JustUnsignedInteger
772- _AbstractNumber : TypeAlias = _JustNumber | _AbstractInteger | _AbstractInexact
773712
774713_int32_min : TypeAlias = int32 | int64
775714_int16_min : TypeAlias = int16 | _int32_min
776715_int16_max : TypeAlias = int16 | int8
777- _int32_max : TypeAlias = int32 | _int16_max
778716_float32_min : TypeAlias = float32 | float64 | longdouble
779717_float32_max : TypeAlias = float32 | float16
780718_float64_max : TypeAlias = float64 | _float32_max
@@ -784,12 +722,7 @@ _integer32_min: TypeAlias = _nt.integer32 | _nt.integer64
784722_inexact64_min : TypeAlias = _nt .inexact64 | _nt .inexact64l
785723_inexact64_max : TypeAlias = _float64_max | _complex128_max
786724
787- _ArrayUInt_co : TypeAlias = _nt .Array [_nt .co_uint64 ]
788- _ArrayInt_co : TypeAlias = _nt .Array [_nt .co_int64 ]
789725_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 ]
793726_ArrayComplex_co : TypeAlias = _nt .Array [_nt .co_complex ]
794727_ArrayTD64_co : TypeAlias = _nt .Array [_nt .co_timedelta ]
795728
@@ -798,21 +731,6 @@ _ToIndices: TypeAlias = _ToIndex | tuple[_ToIndex, ...]
798731
799732_Axis0D : TypeAlias = L [0 , - 1 ] | tuple [()]
800733
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-
816734_PyBoolND : TypeAlias = _nt .SequenceND [py_bool ]
817735_PyCoIntND : TypeAlias = _nt .SequenceND [int ]
818736_PyCoFloatND : TypeAlias = _nt .SequenceND [float ]
@@ -821,11 +739,6 @@ _PyIntND: TypeAlias = _nt.SequenceND[_nt.JustInt]
821739_PyFloatND : TypeAlias = _nt .SequenceND [_nt .JustFloat ]
822740_PyComplexND : TypeAlias = _nt .SequenceND [_nt .JustComplex ]
823741
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-
829742# can be anything, is case-insensitive, and only the first character matters
830743_ByteOrder : TypeAlias = L [
831744 "S" , # swap the current order (default)
@@ -898,7 +811,7 @@ _DTypeBuiltinKind: TypeAlias = L[0, 1, 2]
898811_ArrayAPIVersion : TypeAlias = L ["2021.12" , "2022.12" , "2023.12" ]
899812_Device : TypeAlias = L ["cpu" ]
900813
901- _OrderCF : TypeAlias = L ["C" , "F" ] | None
814+ _OrderCF : TypeAlias = L ["C" , "F" ] | None # noqa: PYI047
902815_OrderACF : TypeAlias = L ["A" , "C" , "F" ] | None
903816_OrderKACF : TypeAlias = L ["K" , "A" , "C" , "F" ] | None
904817
@@ -941,7 +854,6 @@ _IntTD64Unit: TypeAlias = L[_MonthUnit, _IntTimeUnit]
941854_TD64Unit : TypeAlias = L [_DateUnit , _TimeUnit ]
942855_TimeUnitSpec : TypeAlias = _TD64UnitT | tuple [_TD64UnitT , CanIndex ]
943856
944- _BinOperandComplex128_co : TypeAlias = complex | float64 | _integer32_min
945857_ToReal : TypeAlias = float | CanComplex | CanFloat | CanIndex
946858_ToImag : TypeAlias = float | CanFloat | CanIndex
947859
0 commit comments