Add EllipsisType, NoneType, and NotImplementedType (Python 3.10) (#4822)

This commit is contained in:
Sebastian Rittau authored and GitHub committed 2020-12-14 18:38:35 +01:00
1 parent e5d3a47632
commit 1c6ac09b82
2 files changed
+15 -4

No files matched your search

+7 -4
View File
@@ -170,7 +170,10 @@ else:
ReadableBuffer = Union[bytes, bytearray, memoryview, array.array, mmap.mmap, buffer]
WriteableBuffer = Union[bytearray, memoryview, array.array, mmap.mmap, buffer]
# Used by type checkers for checks involving None (does not exist at runtime)
@final
class NoneType:
def __bool__(self) -> Literal[False]: ...
if sys.version_info >= (3, 10):
from types import NoneType as NoneType
else:
# Used by type checkers for checks involving None (does not exist at runtime)
@final
class NoneType:
def __bool__(self) -> Literal[False]: ...