mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-24 03:51:52 +08:00
Update SupportsIndex support for math and cmath (#6216)
* SupportsIndex for cmath * Don't support __index__ on <3.7
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
import sys
|
||||
from typing import SupportsComplex, SupportsFloat, Union
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
from typing import SupportsIndex
|
||||
|
||||
e: float
|
||||
pi: float
|
||||
inf: float
|
||||
@@ -8,7 +12,10 @@ nan: float
|
||||
nanj: complex
|
||||
tau: float
|
||||
|
||||
_C = Union[SupportsFloat, SupportsComplex, complex]
|
||||
if sys.version_info >= (3, 8):
|
||||
_C = Union[SupportsFloat, SupportsComplex, SupportsIndex, complex]
|
||||
else:
|
||||
_C = Union[SupportsFloat, SupportsComplex, complex]
|
||||
|
||||
def acos(__z: _C) -> complex: ...
|
||||
def acosh(__z: _C) -> complex: ...
|
||||
|
||||
Reference in New Issue
Block a user