File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 1+ import sys
12from typing import SupportsComplex , SupportsFloat , Union
23
4+ if sys .version_info >= (3 , 8 ):
5+ from typing import SupportsIndex
6+
37e : float
48pi : float
59inf : float
@@ -8,7 +12,10 @@ nan: float
812nanj : complex
913tau : float
1014
11- _C = Union [SupportsFloat , SupportsComplex , complex ]
15+ if sys .version_info >= (3 , 8 ):
16+ _C = Union [SupportsFloat , SupportsComplex , SupportsIndex , complex ]
17+ else :
18+ _C = Union [SupportsFloat , SupportsComplex , complex ]
1219
1320def acos (__z : _C ) -> complex : ...
1421def acosh (__z : _C ) -> complex : ...
Original file line number Diff line number Diff line change @@ -3,7 +3,10 @@ from _typeshed import SupportsTrunc
33from typing import Iterable , SupportsFloat , Union , overload
44from typing_extensions import SupportsIndex
55
6- _SupportsFloatOrIndex = Union [SupportsFloat , SupportsIndex ]
6+ if sys .version_info >= (3 , 8 ):
7+ _SupportsFloatOrIndex = Union [SupportsFloat , SupportsIndex ]
8+ else :
9+ _SupportsFloatOrIndex = SupportsFloat
710
811e : float
912pi : float
@@ -36,7 +39,13 @@ def erfc(__x: _SupportsFloatOrIndex) -> float: ...
3639def exp (__x : _SupportsFloatOrIndex ) -> float : ...
3740def expm1 (__x : _SupportsFloatOrIndex ) -> float : ...
3841def fabs (__x : _SupportsFloatOrIndex ) -> float : ...
39- def factorial (__x : SupportsIndex ) -> int : ...
42+
43+ if sys .version_info >= (3 , 8 ):
44+ def factorial (__x : SupportsIndex ) -> int : ...
45+
46+ else :
47+ def factorial (__x : int ) -> int : ...
48+
4049def floor (__x : _SupportsFloatOrIndex ) -> int : ...
4150def fmod (__x : _SupportsFloatOrIndex , __y : _SupportsFloatOrIndex ) -> float : ...
4251def frexp (__x : _SupportsFloatOrIndex ) -> tuple [float , int ]: ...
You can’t perform that action at this time.
0 commit comments