Add several Python 3.8 annotations (#3347)

This commit is contained in:
Sebastian Rittau
2019-10-12 19:36:56 +02:00
committed by GitHub
parent 8ec25708d9
commit 62bbdf856c
11 changed files with 115 additions and 32 deletions

View File

@@ -611,7 +611,10 @@ class NamedTuple(Tuple[Any, ...]):
@classmethod
def _make(cls: Type[_T], iterable: Iterable[Any]) -> _T: ...
def _asdict(self) -> collections.OrderedDict[str, Any]: ...
if sys.version_info >= (3, 8):
def _asdict(self) -> Dict[str, Any]: ...
else:
def _asdict(self) -> collections.OrderedDict[str, Any]: ...
def _replace(self: _T, **kwargs: Any) -> _T: ...
# Internal mypy fallback type for all typed dicts (does not exist at runtime)