File tree 2 files changed +19
-3
lines changed
2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change
1
+ import sys
1
2
from typing import SupportsComplex , SupportsFloat , Union
2
3
4
+ if sys .version_info >= (3 , 8 ):
5
+ from typing import SupportsIndex
6
+
3
7
e : float
4
8
pi : float
5
9
inf : float
@@ -8,7 +12,10 @@ nan: float
8
12
nanj : complex
9
13
tau : float
10
14
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 ]
12
19
13
20
def acos (__z : _C ) -> complex : ...
14
21
def acosh (__z : _C ) -> complex : ...
Original file line number Diff line number Diff line change @@ -3,7 +3,10 @@ from _typeshed import SupportsTrunc
3
3
from typing import Iterable , SupportsFloat , Union , overload
4
4
from typing_extensions import SupportsIndex
5
5
6
- _SupportsFloatOrIndex = Union [SupportsFloat , SupportsIndex ]
6
+ if sys .version_info >= (3 , 8 ):
7
+ _SupportsFloatOrIndex = Union [SupportsFloat , SupportsIndex ]
8
+ else :
9
+ _SupportsFloatOrIndex = SupportsFloat
7
10
8
11
e : float
9
12
pi : float
@@ -36,7 +39,13 @@ def erfc(__x: _SupportsFloatOrIndex) -> float: ...
36
39
def exp (__x : _SupportsFloatOrIndex ) -> float : ...
37
40
def expm1 (__x : _SupportsFloatOrIndex ) -> float : ...
38
41
def 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
+
40
49
def floor (__x : _SupportsFloatOrIndex ) -> int : ...
41
50
def fmod (__x : _SupportsFloatOrIndex , __y : _SupportsFloatOrIndex ) -> float : ...
42
51
def frexp (__x : _SupportsFloatOrIndex ) -> tuple [float , int ]: ...
You can’t perform that action at this time.
0 commit comments