BUG: typing.final supports properties (#5985)

Fixes #5984
This commit is contained in:
Torsten Wörtwein
2021-08-31 03:07:57 -04:00
committed by GitHub
parent 5f77310418
commit d4f0725452

View File

@@ -37,6 +37,7 @@ class _SpecialForm:
_F = TypeVar("_F", bound=Callable[..., Any])
_P = _ParamSpec("_P")
_T = TypeVar("_T")
def overload(func: _F) -> _F: ...
@@ -51,7 +52,7 @@ Type: _SpecialForm = ...
ClassVar: _SpecialForm = ...
if sys.version_info >= (3, 8):
Final: _SpecialForm = ...
def final(f: _F) -> _F: ...
def final(f: _T) -> _T: ...
Literal: _SpecialForm = ...
# TypedDict is a (non-subscriptable) special form.
TypedDict: object
@@ -88,7 +89,6 @@ if sys.version_info >= (3, 10):
NoReturn = Union[None]
# These type variables are used by the container types.
_T = TypeVar("_T")
_S = TypeVar("_S")
_KT = TypeVar("_KT") # Key type.
_VT = TypeVar("_VT") # Value type.