mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 08:47:39 +08:00
Make all function annotations accessible from builtins complete
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from typing import Any, Dict, Set, Union, Tuple
|
||||
from typing import Any, Dict, Set, Union, Tuple, List
|
||||
import _weakrefset
|
||||
|
||||
# mypy has special processing for ABCMeta and abstractmethod.
|
||||
@@ -7,7 +7,7 @@ WeakSet = ... # type: _weakrefset.WeakSet
|
||||
_InstanceType = ... # type: type
|
||||
types = ... # type: module
|
||||
|
||||
def abstractmethod(funcobj) -> Any: ...
|
||||
def abstractmethod(funcobj: Any) -> Any: ...
|
||||
|
||||
class ABCMeta(type):
|
||||
# TODO: FrozenSet
|
||||
@@ -18,10 +18,10 @@ class ABCMeta(type):
|
||||
_abc_negative_cache = ... # type: _weakrefset.WeakSet
|
||||
_abc_negative_cache_version = ... # type: int
|
||||
_abc_registry = ... # type: _weakrefset.WeakSet
|
||||
def __init__(self, name, bases, namespace: Dict[Any, Any]) -> None: ...
|
||||
def __instancecheck__(cls: "ABCMeta", instance) -> Any: ...
|
||||
def __subclasscheck__(cls: "ABCMeta", subclass) -> Any: ...
|
||||
def _dump_registry(cls: "ABCMeta", *args, **kwargs) -> None: ...
|
||||
def __init__(self, name: str, bases: List[type], namespace: Dict[Any, Any]) -> None: ...
|
||||
def __instancecheck__(cls: "ABCMeta", instance: Any) -> Any: ...
|
||||
def __subclasscheck__(cls: "ABCMeta", subclass: Any) -> Any: ...
|
||||
def _dump_registry(cls: "ABCMeta", *args: Any, **kwargs: Any) -> None: ...
|
||||
# TODO: subclass: Union["ABCMeta", type, Tuple[type, ...]]
|
||||
def register(cls: "ABCMeta", subclass: Any) -> None: ...
|
||||
|
||||
@@ -30,7 +30,7 @@ class _C:
|
||||
|
||||
# TODO: The real abc.abstractproperty inherits from "property".
|
||||
class abstractproperty(object):
|
||||
def __new__(cls, func): ...
|
||||
def __new__(cls, func: Any) -> Any: ...
|
||||
__doc__ = ... # type: str
|
||||
__isabstractmethod__ = ... # type: bool
|
||||
doc = ... # type: Any
|
||||
|
||||
Reference in New Issue
Block a user