mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
Move NotImplementedType to types.pyi (#14966)
This commit is contained in:
+9
-9
@@ -1367,13 +1367,6 @@ class property:
|
||||
def __set__(self, instance: Any, value: Any, /) -> None: ...
|
||||
def __delete__(self, instance: Any, /) -> None: ...
|
||||
|
||||
@final
|
||||
@type_check_only
|
||||
class _NotImplementedType(Any):
|
||||
__call__: None
|
||||
|
||||
NotImplemented: _NotImplementedType
|
||||
|
||||
def abs(x: SupportsAbs[_T], /) -> _T: ...
|
||||
def all(iterable: Iterable[object], /) -> bool: ...
|
||||
def any(iterable: Iterable[object], /) -> bool: ...
|
||||
@@ -2032,14 +2025,14 @@ def __import__(
|
||||
def __build_class__(func: Callable[[], CellType | Any], name: str, /, *bases: Any, metaclass: Any = ..., **kwds: Any) -> Any: ...
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
from types import EllipsisType
|
||||
from types import EllipsisType, NotImplementedType
|
||||
|
||||
# Backwards compatibility hack for folks who relied on the ellipsis type
|
||||
# existing in typeshed in Python 3.9 and earlier.
|
||||
ellipsis = EllipsisType
|
||||
|
||||
Ellipsis: EllipsisType
|
||||
|
||||
NotImplemented: NotImplementedType
|
||||
else:
|
||||
# Actually the type of Ellipsis is <type 'ellipsis'>, but since it's
|
||||
# not exposed anywhere under that name, we make it private here.
|
||||
@@ -2049,6 +2042,13 @@ else:
|
||||
|
||||
Ellipsis: ellipsis
|
||||
|
||||
@final
|
||||
@type_check_only
|
||||
class _NotImplementedType(Any):
|
||||
__call__: None
|
||||
|
||||
NotImplemented: _NotImplementedType
|
||||
|
||||
@disjoint_base
|
||||
class BaseException:
|
||||
args: tuple[Any, ...]
|
||||
|
||||
Reference in New Issue
Block a user