mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
committed by
Guido van Rossum
parent
0bfa0636e1
commit
a277980d99
@@ -3,9 +3,14 @@
|
||||
|
||||
# TODO parts of this should be conditional on version
|
||||
|
||||
from typing import Any, Callable, Dict, Iterator, Optional, Tuple, TypeVar, Union, overload
|
||||
from typing import (
|
||||
Any, Callable, Dict, Generic, Iterator, Mapping, Optional, Tuple, TypeVar,
|
||||
Union, overload
|
||||
)
|
||||
|
||||
_T = TypeVar('_T')
|
||||
_KT = TypeVar('_KT')
|
||||
_VT = TypeVar('_VT')
|
||||
|
||||
class _Cell:
|
||||
cell_contents = ... # type: Any
|
||||
@@ -57,16 +62,12 @@ class CodeType:
|
||||
cellvars: Tuple[str, ...] = ...,
|
||||
) -> None: ...
|
||||
|
||||
class MappingProxyType:
|
||||
def copy(self) -> dict: ...
|
||||
def get(self, key: str, default: _T = ...) -> Union[Any, _T]: ...
|
||||
def items(self) -> Iterator[Tuple[str, Any]]: ...
|
||||
def keys(self) -> Iterator[str]: ...
|
||||
def values(self) -> Iterator[Any]: ...
|
||||
def __contains__(self, key: str) -> bool: ...
|
||||
def __getitem__(self, key: str) -> Any: ...
|
||||
def __iter__(self) -> Iterator[str]: ...
|
||||
class MappingProxyType(Mapping[_KT, _VT], Generic[_KT, _VT]):
|
||||
def __init__(self, mapping: Mapping[_KT, _VT]) -> None: ...
|
||||
def __getitem__(self, k: _KT) -> _VT: ...
|
||||
def __iter__(self) -> Iterator[_KT]: ...
|
||||
def __len__(self) -> int: ...
|
||||
|
||||
class SimpleNamespace(Any): ...
|
||||
|
||||
class GeneratorType:
|
||||
|
||||
Reference in New Issue
Block a user