Third-party stubs: import from collections.abc where possible (#7637)

This commit is contained in:
Alex Waygood
2022-04-16 14:52:57 +01:00
committed by GitHub
parent ee09d9eb19
commit 653f2c6ba4
146 changed files with 268 additions and 156 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
from typing import Any, Iterable
from collections.abc import Iterable
from typing import Any
class FormatChecker:
checkers: Any
@@ -1,4 +1,5 @@
from typing import Any, ItemsView
from collections.abc import ItemsView
from typing import Any
def ignore_ref_siblings(schema) -> list[tuple[str, Any]] | ItemsView[str, Any]: ...
def dependencies_draft3(validator, dependencies, instance, schema) -> None: ...
+1 -1
View File
@@ -1,4 +1,4 @@
from typing import Callable, Iterable, Mapping
from collections.abc import Callable, Iterable, Mapping
def is_array(checker, instance) -> bool: ...
def is_bool(checker, instance) -> bool: ...
+2 -1
View File
@@ -1,5 +1,6 @@
from _typeshed import SupportsKeysAndGetItem
from typing import Any, Generator, Iterable, Iterator, Mapping, MutableMapping, Sized
from collections.abc import Generator, Iterable, Iterator, Mapping, MutableMapping, Sized
from typing import Any
class URIDict(MutableMapping[str, str]):
def normalize(self, uri: str) -> str: ...
+2 -1
View File
@@ -1,4 +1,5 @@
from typing import Any, ClassVar, Iterator, Protocol
from collections.abc import Iterator
from typing import Any, ClassVar, Protocol
from jsonschema._format import FormatChecker
from jsonschema._types import TypeChecker
+2 -2
View File
@@ -1,6 +1,6 @@
from _typeshed import SupportsKeysAndGetItem
from collections.abc import Callable, Generator, Iterable
from typing import Any, ClassVar, Mapping
from collections.abc import Callable, Generator, Iterable, Mapping
from typing import Any, ClassVar
from typing_extensions import TypeAlias
from ._utils import URIDict