Skip to content

Commit b6eaadc

Browse files
authored
Update typing_extensions imports in third-party stubs (#11245)
1 parent 1b471a9 commit b6eaadc

File tree

488 files changed

+715
-845
lines changed

Some content is hidden

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

488 files changed

+715
-845
lines changed

stubs/Deprecated/deprecated/classic.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from collections.abc import Callable
2-
from typing import Any, TypeVar, overload
3-
from typing_extensions import Literal, TypeAlias
2+
from typing import Any, Literal, TypeVar, overload
3+
from typing_extensions import TypeAlias
44

55
_F = TypeVar("_F", bound=Callable[..., Any])
66
_Actions: TypeAlias = Literal["default", "error", "ignore", "always", "module", "once"]

stubs/Deprecated/deprecated/sphinx.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from collections.abc import Callable
2-
from typing import Any, TypeVar
3-
from typing_extensions import Literal
2+
from typing import Any, Literal, TypeVar
43

54
from .classic import ClassicAdapter, _Actions
65

stubs/ExifRead/exifread/_types.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Stubs-only module with type aliases for ExifRead.
22

3-
from typing import Any, Protocol
4-
from typing_extensions import Literal, TypeAlias
3+
from typing import Any, Literal, Protocol
4+
from typing_extensions import TypeAlias
55

66
# The second item of the value tuple - if it exists - can be a variety of types,
77
# including a callable or another dict.

stubs/ExifRead/exifread/classes.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from logging import Logger
2-
from typing import Any
3-
from typing_extensions import Literal
2+
from typing import Any, Literal
43

54
from ._types import Reader, TagDict
65

stubs/Flask-Cors/flask_cors/core.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ from collections.abc import Iterable
22
from datetime import timedelta
33
from logging import Logger
44
from re import Pattern
5-
from typing import Any, TypeVar, overload
6-
from typing_extensions import TypeAlias, TypedDict
5+
from typing import Any, TypedDict, TypeVar, overload
6+
from typing_extensions import TypeAlias
77

88
import flask
99

stubs/Flask-SocketIO/flask_socketio/test_client.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from _typeshed import Incomplete
2-
from typing import Any
3-
from typing_extensions import TypedDict
2+
from typing import Any, TypedDict
43

54
from flask import Flask
65
from flask.testing import FlaskClient

stubs/JACK-Client/jack/__init__.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import sys
22
from _typeshed import Unused
33
from collections.abc import Callable, Generator, Iterable, Iterator, Sequence
4-
from typing import Any, NoReturn, overload
5-
from typing_extensions import Literal, Self
4+
from typing import Any, Literal, NoReturn, overload
5+
from typing_extensions import Self
66

77
import numpy
88
from _cffi_backend import _CDataBase

stubs/Markdown/markdown/core.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from collections.abc import Callable, Mapping, Sequence
2-
from typing import Any, ClassVar, Protocol
3-
from typing_extensions import Literal, Self
2+
from typing import Any, ClassVar, Literal, Protocol
3+
from typing_extensions import Self
44
from xml.etree.ElementTree import Element
55

66
from . import blockparser, inlinepatterns, postprocessors, preprocessors, treeprocessors

stubs/Markdown/markdown/extensions/toc.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from collections.abc import Iterator, MutableSet
22
from re import Pattern
3-
from typing import Any
4-
from typing_extensions import TypedDict
3+
from typing import Any, TypedDict
54
from xml.etree.ElementTree import Element
65

76
from markdown.core import Markdown

stubs/Markdown/markdown/util.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from collections.abc import Iterator
22
from re import Pattern
3-
from typing import Any, Generic, TypeVar, overload
4-
from typing_extensions import TypedDict
3+
from typing import Any, Generic, TypedDict, TypeVar, overload
54

65
from markdown.core import Markdown
76

stubs/Pillow/PIL/BlpImagePlugin.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from _typeshed import Incomplete
22
from enum import IntEnum
3-
from typing import ClassVar
4-
from typing_extensions import Literal
3+
from typing import ClassVar, Literal
54

65
from .ImageFile import ImageFile, PyDecoder, PyEncoder
76

stubs/Pillow/PIL/BmpImagePlugin.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from _typeshed import Incomplete
2-
from typing import ClassVar
3-
from typing_extensions import Final, Literal
2+
from typing import ClassVar, Final, Literal
43

54
from .ImageFile import ImageFile, PyDecoder
65

stubs/Pillow/PIL/BufrStubImagePlugin.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
from typing import ClassVar
2-
from typing_extensions import Literal
1+
from typing import ClassVar, Literal
32

43
from .ImageFile import StubImageFile
54

stubs/Pillow/PIL/CurImagePlugin.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
from typing import ClassVar
2-
from typing_extensions import Literal
1+
from typing import ClassVar, Literal
32

43
from .BmpImagePlugin import BmpImageFile
54

stubs/Pillow/PIL/DcxImagePlugin.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from _typeshed import Incomplete
2-
from typing import ClassVar
3-
from typing_extensions import Literal
2+
from typing import ClassVar, Literal
43

54
from .PcxImagePlugin import PcxImageFile
65

stubs/Pillow/PIL/DdsImagePlugin.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
from typing import ClassVar
2-
from typing_extensions import Final, Literal
1+
from typing import ClassVar, Final, Literal
32

43
from .ImageFile import ImageFile
54

stubs/Pillow/PIL/EpsImagePlugin.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import sys
22
from _typeshed import Incomplete
3-
from typing import ClassVar
4-
from typing_extensions import Literal
3+
from typing import ClassVar, Literal
54

65
from ._imaging import _PixelAccessor
76
from .ImageFile import ImageFile

stubs/Pillow/PIL/FliImagePlugin.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
from typing import ClassVar
2-
from typing_extensions import Literal
1+
from typing import ClassVar, Literal
32

43
from .ImageFile import ImageFile
54

stubs/Pillow/PIL/FpxImagePlugin.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from _typeshed import Incomplete
2-
from typing import Any, ClassVar
3-
from typing_extensions import Literal, TypeAlias
2+
from typing import Any, ClassVar, Literal
3+
from typing_extensions import TypeAlias
44

55
from ._imaging import _PixelAccessor
66
from .ImageFile import ImageFile

stubs/Pillow/PIL/FtexImagePlugin.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from enum import IntEnum
2-
from typing import ClassVar
3-
from typing_extensions import Literal
2+
from typing import ClassVar, Literal
43

54
from .ImageFile import ImageFile
65

stubs/Pillow/PIL/GbrImagePlugin.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from _typeshed import Incomplete
2-
from typing import ClassVar
3-
from typing_extensions import Literal
2+
from typing import ClassVar, Literal
43

54
from ._imaging import _PixelAccessor
65
from .ImageFile import ImageFile

stubs/Pillow/PIL/GdImageFile.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
from typing import ClassVar
2-
from typing_extensions import Literal
1+
from typing import ClassVar, Literal
32

43
from .ImageFile import ImageFile
54

stubs/Pillow/PIL/GifImagePlugin.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from _typeshed import Incomplete
22
from enum import IntEnum
3-
from typing import ClassVar
4-
from typing_extensions import Literal
3+
from typing import ClassVar, Literal
54

65
from .ImageFile import ImageFile
76

stubs/Pillow/PIL/GribStubImagePlugin.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
from typing import ClassVar
2-
from typing_extensions import Literal
1+
from typing import ClassVar, Literal
32

43
from .ImageFile import StubImageFile
54

stubs/Pillow/PIL/Hdf5StubImagePlugin.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
from typing import ClassVar
2-
from typing_extensions import Literal
1+
from typing import ClassVar, Literal
32

43
from .ImageFile import StubImageFile
54

stubs/Pillow/PIL/IcnsImagePlugin.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from _typeshed import Incomplete
2-
from typing import ClassVar
3-
from typing_extensions import Final, Literal
2+
from typing import ClassVar, Final, Literal
43

54
from ._imaging import _PixelAccessor
65
from .ImageFile import ImageFile

stubs/Pillow/PIL/IcoImagePlugin.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from _typeshed import Incomplete
2-
from typing import ClassVar
3-
from typing_extensions import Literal
2+
from typing import ClassVar, Literal
43

54
from ._imaging import _PixelAccessor
65
from .ImageFile import ImageFile

stubs/Pillow/PIL/ImImagePlugin.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from _typeshed import Incomplete
2-
from typing import ClassVar
3-
from typing_extensions import Literal
2+
from typing import ClassVar, Literal
43

54
from .ImageFile import ImageFile
65

stubs/Pillow/PIL/Image.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ from _typeshed import Incomplete, SupportsRead, SupportsWrite, Unused
22
from collections.abc import Callable, Iterable, Iterator, MutableMapping, Sequence
33
from enum import IntEnum
44
from pathlib import Path
5-
from typing import Any, ClassVar, Protocol, SupportsBytes
6-
from typing_extensions import Literal, Self, TypeAlias, TypeGuard
5+
from typing import Any, ClassVar, Literal, Protocol, SupportsBytes
6+
from typing_extensions import Self, TypeAlias, TypeGuard
77

88
from PIL.PyAccess import PyAccess
99

stubs/Pillow/PIL/ImageDraw.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from _typeshed import Incomplete
22
from collections.abc import Container, Sequence
3-
from typing import Any, overload
4-
from typing_extensions import Literal, TypeAlias
3+
from typing import Any, Literal, overload
4+
from typing_extensions import TypeAlias
55

66
from .Image import Image
77
from .ImageColor import _Ink

stubs/Pillow/PIL/ImageFilter.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from _typeshed import Incomplete
22
from collections.abc import Callable, Iterable, Sequence
3-
from typing_extensions import Literal, Self, TypeAlias
3+
from typing import Literal
4+
from typing_extensions import Self, TypeAlias
45

56
from .Image import Image
67

stubs/Pillow/PIL/ImageFont.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from _typeshed import FileDescriptorOrPath, Incomplete, SupportsRead
22
from enum import IntEnum
3-
from typing import Protocol
4-
from typing_extensions import Final, Literal
3+
from typing import Final, Literal, Protocol
54

65
from PIL.Image import Transpose
76

stubs/Pillow/PIL/ImageQt.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from _typeshed import Incomplete
2-
from typing import Any
3-
from typing_extensions import Literal, TypeAlias
2+
from typing import Any, Literal
3+
from typing_extensions import TypeAlias
44

55
from .Image import Image
66

stubs/Pillow/PIL/ImageShow.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from _typeshed import Incomplete, Unused
2-
from typing import Any
3-
from typing_extensions import Literal
2+
from typing import Any, Literal
43

54
def register(viewer, order: int = 1) -> None: ...
65
def show(image, title: Incomplete | None = None, **options): ...

stubs/Pillow/PIL/ImtImagePlugin.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from _typeshed import Incomplete
2-
from typing import ClassVar
3-
from typing_extensions import Literal
2+
from typing import ClassVar, Literal
43

54
from .ImageFile import ImageFile
65

stubs/Pillow/PIL/IptcImagePlugin.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from _typeshed import Incomplete
2-
from typing import ClassVar
3-
from typing_extensions import Literal
2+
from typing import ClassVar, Literal
43

54
from ._imaging import _PixelAccessor
65
from .ImageFile import ImageFile

stubs/Pillow/PIL/Jpeg2KImagePlugin.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from _typeshed import Incomplete
2-
from typing import ClassVar
3-
from typing_extensions import Literal
2+
from typing import ClassVar, Literal
43

54
from ._imaging import _PixelAccessor
65
from .ImageFile import ImageFile

stubs/Pillow/PIL/JpegImagePlugin.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from _typeshed import Incomplete
2-
from typing import ClassVar
3-
from typing_extensions import Literal
2+
from typing import ClassVar, Literal
43

54
from .ImageFile import ImageFile
65

stubs/Pillow/PIL/McIdasImagePlugin.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
from typing import ClassVar
2-
from typing_extensions import Literal
1+
from typing import ClassVar, Literal
32

43
from .ImageFile import ImageFile
54

stubs/Pillow/PIL/MicImagePlugin.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from typing import Any, ClassVar
2-
from typing_extensions import Literal, TypeAlias
1+
from typing import Any, ClassVar, Literal
2+
from typing_extensions import TypeAlias
33

44
from .TiffImagePlugin import TiffImageFile
55

stubs/Pillow/PIL/MpegImagePlugin.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from _typeshed import Incomplete
2-
from typing import ClassVar
3-
from typing_extensions import Literal
2+
from typing import ClassVar, Literal
43

54
from .ImageFile import ImageFile
65

stubs/Pillow/PIL/MpoImagePlugin.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from _typeshed import Incomplete
2-
from typing import ClassVar
3-
from typing_extensions import Literal
2+
from typing import ClassVar, Literal
43

54
from .JpegImagePlugin import JpegImageFile
65

stubs/Pillow/PIL/MspImagePlugin.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
from typing import ClassVar
2-
from typing_extensions import Literal
1+
from typing import ClassVar, Literal
32

43
from .ImageFile import ImageFile, PyDecoder
54

stubs/Pillow/PIL/PcdImagePlugin.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from _typeshed import Incomplete
2-
from typing import ClassVar
3-
from typing_extensions import Literal
2+
from typing import ClassVar, Literal
43

54
from .ImageFile import ImageFile
65

stubs/Pillow/PIL/PcxImagePlugin.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from _typeshed import Incomplete
2-
from typing import ClassVar
3-
from typing_extensions import Literal
2+
from typing import ClassVar, Literal
43

54
from .ImageFile import ImageFile
65

stubs/Pillow/PIL/PdfParser.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import collections
22
from _typeshed import Incomplete
33
from types import TracebackType
4-
from typing import Any
5-
from typing_extensions import Literal
4+
from typing import Any, Literal
65

76
def encode_text(s: str) -> bytes: ...
87

stubs/Pillow/PIL/PixarImagePlugin.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
from typing import ClassVar
2-
from typing_extensions import Literal
1+
from typing import ClassVar, Literal
32

43
from .ImageFile import ImageFile
54

0 commit comments

Comments
 (0)