mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Use PEP 585 syntax in Python 2, protobuf & _ast stubs, where possible (#6949)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import _weakrefset
|
||||
from _typeshed import SupportsWrite
|
||||
from typing import Any, Callable, Dict, Set, Tuple, Type, TypeVar
|
||||
from typing import Any, Callable, TypeVar
|
||||
|
||||
_FuncT = TypeVar("_FuncT", bound=Callable[..., Any])
|
||||
|
||||
@@ -15,11 +15,11 @@ class ABCMeta(type):
|
||||
_abc_negative_cache: _weakrefset.WeakSet[Any]
|
||||
_abc_negative_cache_version: int
|
||||
_abc_registry: _weakrefset.WeakSet[Any]
|
||||
def __init__(self, name: str, bases: Tuple[type, ...], namespace: Dict[str, Any]) -> None: ...
|
||||
def __init__(self, name: str, bases: tuple[type, ...], namespace: dict[str, Any]) -> None: ...
|
||||
def __instancecheck__(cls: ABCMeta, instance: Any) -> Any: ...
|
||||
def __subclasscheck__(cls: ABCMeta, subclass: Any) -> Any: ...
|
||||
def _dump_registry(cls: ABCMeta, file: SupportsWrite[Any] | None = ...) -> None: ...
|
||||
def register(cls: ABCMeta, subclass: Type[Any]) -> None: ...
|
||||
def register(cls: ABCMeta, subclass: type[Any]) -> None: ...
|
||||
|
||||
# TODO: The real abc.abstractproperty inherits from "property".
|
||||
class abstractproperty(object):
|
||||
|
||||
Reference in New Issue
Block a user