Skip to content

Commit 653f2c6

Browse files
authored
Third-party stubs: import from collections.abc where possible (#7637)
1 parent ee09d9e commit 653f2c6

File tree

146 files changed

+268
-156
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+268
-156
lines changed

stubs/DateTimeRange/datetimerange/__init__.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import datetime
22
from _typeshed import Self
3-
from typing import Iterable
3+
from collections.abc import Iterable
44

55
from dateutil.relativedelta import relativedelta
66

stubs/Flask-Cors/flask_cors/core.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
from collections.abc import Iterable
12
from datetime import timedelta
23
from logging import Logger
3-
from typing import Any, Iterable, Pattern, TypeVar, overload
4+
from typing import Any, Pattern, TypeVar, overload
45
from typing_extensions import TypeAlias, TypedDict
56

67
_IterableT = TypeVar("_IterableT", bound=Iterable[Any])

stubs/Flask-Cors/flask_cors/decorator.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
from collections.abc import Callable
12
from datetime import timedelta
23
from logging import Logger
3-
from typing import Any, Callable
4+
from typing import Any
45
from typing_extensions import ParamSpec
56

67
_P = ParamSpec("_P")

stubs/Flask-Cors/flask_cors/extension.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
from collections.abc import Callable, Iterable
12
from datetime import timedelta
23
from logging import Logger
3-
from typing import Any, Callable, Iterable
4+
from typing import Any
45

56
_App = Any # flask is not part of typeshed
67

stubs/JACK-Client/jack/__init__.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from _typeshed import Self
2-
from typing import Any, Callable, Generator, Iterable, Iterator, Sequence, overload
2+
from collections.abc import Callable, Generator, Iterable, Iterator, Sequence
3+
from typing import Any, overload
34

45
_NDArray = Any # FIXME: no typings for numpy arrays
56

stubs/Markdown/markdown/blockparser.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
from typing import Any, Iterable, TypeVar
1+
from collections.abc import Iterable
2+
from typing import Any, TypeVar
23
from xml.etree.ElementTree import Element, ElementTree
34

45
from . import Markdown

stubs/Markdown/markdown/core.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from _typeshed import Self
2-
from typing import Any, BinaryIO, Callable, ClassVar, Mapping, Sequence, Text, TextIO
2+
from collections.abc import Callable, Mapping, Sequence
3+
from typing import Any, BinaryIO, ClassVar, Text, TextIO
34
from typing_extensions import Literal
45
from xml.etree.ElementTree import Element
56

stubs/Markdown/markdown/extensions/__init__.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
from typing import Any, Mapping
1+
from collections.abc import Mapping
2+
from typing import Any
23

34
from markdown.core import Markdown
45

stubs/Pillow/PIL/ExifTags.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Mapping
1+
from collections.abc import Mapping
22

33
TAGS: Mapping[int, str]
44
GPSTAGS: Mapping[int, str]

stubs/Pillow/PIL/Image.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from _typeshed import Self, SupportsRead, SupportsWrite
2-
from collections.abc import Iterable, Iterator, MutableMapping
2+
from collections.abc import Callable, Iterable, Iterator, MutableMapping, Sequence
33
from pathlib import Path
4-
from typing import Any, Callable, ClassVar, Protocol, Sequence, SupportsBytes, Union
4+
from typing import Any, ClassVar, Protocol, SupportsBytes, Union
55
from typing_extensions import Literal, TypeAlias
66

77
from ._imaging import (

0 commit comments

Comments
 (0)