diff --git a/stubs/MarkupSafe/markupsafe/__init__.pyi b/stubs/MarkupSafe/markupsafe/__init__.pyi index 9e54f9fe3..829490717 100644 --- a/stubs/MarkupSafe/markupsafe/__init__.pyi +++ b/stubs/MarkupSafe/markupsafe/__init__.pyi @@ -1,7 +1,6 @@ import string import sys -from collections import Mapping -from typing import Any, Callable, Iterable, List, Optional, Sequence, Text, Tuple, Union +from typing import Any, Callable, Iterable, List, Mapping, Optional, Sequence, Text, Tuple, Union from markupsafe._compat import text_type from markupsafe._native import escape as escape, escape_silent as escape_silent, soft_unicode as soft_unicode diff --git a/stubs/paramiko/paramiko/hostkeys.pyi b/stubs/paramiko/paramiko/hostkeys.pyi index f0cd193b5..8b7e61b54 100644 --- a/stubs/paramiko/paramiko/hostkeys.pyi +++ b/stubs/paramiko/paramiko/hostkeys.pyi @@ -1,10 +1,8 @@ -import collections -import typing -from typing import Dict, Iterator, List, Optional +from typing import Any, Dict, Iterator, List, MutableMapping, Optional from paramiko.pkey import PKey -class _SubDict(typing.MutableMapping[str, PKey]): +class _SubDict(MutableMapping[str, PKey]): # Internal to HostKeys.lookup() def __init__(self, hostname: str, entries: List[HostKeyEntry], hostkeys: HostKeys) -> None: ... def __iter__(self) -> Iterator[str]: ... @@ -14,7 +12,7 @@ class _SubDict(typing.MutableMapping[str, PKey]): def __setitem__(self, key: str, val: PKey) -> None: ... def keys(self) -> List[str]: ... # type: ignore -class HostKeys(collections.MutableMapping): +class HostKeys(MutableMapping[Any, Any]): def __init__(self, filename: Optional[str] = ...) -> None: ... def add(self, hostname: str, keytype: str, key: PKey) -> None: ... def load(self, filename: str) -> None: ... diff --git a/stubs/requests/requests/packages/urllib3/_collections.pyi b/stubs/requests/requests/packages/urllib3/_collections.pyi index 08fa0948d..15aca7bd6 100644 --- a/stubs/requests/requests/packages/urllib3/_collections.pyi +++ b/stubs/requests/requests/packages/urllib3/_collections.pyi @@ -1,5 +1,4 @@ -from collections import MutableMapping -from typing import Any, NoReturn, TypeVar +from typing import Any, MutableMapping, NoReturn, TypeVar _KT = TypeVar("_KT") _VT = TypeVar("_VT") diff --git a/tests/mypy_test.py b/tests/mypy_test.py index 0db653fed..6f48895b4 100755 --- a/tests/mypy_test.py +++ b/tests/mypy_test.py @@ -172,7 +172,7 @@ def main(): print("Cannot import mypy. Did you install it?") sys.exit(1) - versions = [(3, 9), (3, 8), (3, 7), (3, 6), (2, 7)] + versions = [(3, 10), (3, 9), (3, 8), (3, 7), (3, 6), (2, 7)] if args.python_version: versions = [v for v in versions if any(("%d.%d" % v).startswith(av) for av in args.python_version)] if not versions: