mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
add typing._Final (#13015)
This is the subset of typing module internal base classes that are stable over all supported versions of python.
This commit is contained in:
@@ -190,8 +190,10 @@ _T = typing.TypeVar("_T")
|
||||
_F = typing.TypeVar("_F", bound=Callable[..., Any])
|
||||
_TC = typing.TypeVar("_TC", bound=type[object])
|
||||
|
||||
class _Final: ... # This should be imported from typing but that breaks pytype
|
||||
|
||||
# unfortunately we have to duplicate this class definition from typing.pyi or we break pytype
|
||||
class _SpecialForm:
|
||||
class _SpecialForm(_Final):
|
||||
def __getitem__(self, parameters: Any) -> object: ...
|
||||
if sys.version_info >= (3, 10):
|
||||
def __or__(self, other: Any) -> _SpecialForm: ...
|
||||
|
||||
Reference in New Issue
Block a user