mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-27 05:12:10 +08:00
Add @final to many unsubclassable stdlib classes (#6299)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import sys
|
||||
from typing import Any, Callable, Generic, TypeVar, overload
|
||||
from typing_extensions import final
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
from types import GenericAlias
|
||||
@@ -7,9 +8,11 @@ if sys.version_info >= (3, 9):
|
||||
_C = TypeVar("_C", bound=Callable[..., Any])
|
||||
_T = TypeVar("_T")
|
||||
|
||||
@final
|
||||
class CallableProxyType(Generic[_C]): # "weakcallableproxy"
|
||||
def __getattr__(self, attr: str) -> Any: ...
|
||||
|
||||
@final
|
||||
class ProxyType(Generic[_T]): # "weakproxy"
|
||||
def __getattr__(self, attr: str) -> Any: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user