mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 13:34:58 +08:00
Make all function annotations accessible from builtins complete
This commit is contained in:
@@ -21,8 +21,8 @@ no_type_check = object()
|
||||
|
||||
class TypeAlias:
|
||||
# Class for defining generic aliases for library types.
|
||||
def __init__(self, target_type) -> None: ...
|
||||
def __getitem__(self, typeargs): ...
|
||||
def __init__(self, target_type: type) -> None: ...
|
||||
def __getitem__(self, typeargs: Any) -> Any: ...
|
||||
|
||||
Union = TypeAlias(object)
|
||||
Optional = TypeAlias(object)
|
||||
@@ -102,7 +102,7 @@ class Generator(Iterator[_T_co], Generic[_T_co, _T_contra, _V_co]):
|
||||
def send(self, value: _T_contra) -> _T_co:...
|
||||
|
||||
@abstractmethod
|
||||
def throw(self, typ: BaseException, val: Any=None, tb=None) -> None:...
|
||||
def throw(self, typ: BaseException, val: Any = None, tb: Any = None) -> None:...
|
||||
|
||||
@abstractmethod
|
||||
def close(self) -> None:...
|
||||
@@ -284,7 +284,7 @@ class IO(Iterable[AnyStr], Generic[AnyStr]):
|
||||
@abstractmethod
|
||||
def __enter__(self) -> 'IO[AnyStr]': ...
|
||||
@abstractmethod
|
||||
def __exit__(self, type, value, traceback) -> bool: ...
|
||||
def __exit__(self, t: type, value: Any, traceback: Any) -> bool: ...
|
||||
|
||||
class BinaryIO(IO[bytes]):
|
||||
# TODO readinto
|
||||
|
||||
Reference in New Issue
Block a user