mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-15 14:31:59 +08:00
Update typing_extensions imports in third-party stubs (#11245)
This commit is contained in:
@@ -4,8 +4,8 @@ from collections import OrderedDict
|
||||
from collections.abc import Callable, Generator, Iterator, Sequence
|
||||
from contextlib import contextmanager
|
||||
from re import Pattern
|
||||
from typing import Any, ClassVar, NamedTuple, TypeVar, overload
|
||||
from typing_extensions import Literal, Self, TypeAlias
|
||||
from typing import Any, ClassVar, Literal, NamedTuple, TypeVar, overload
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
from .syntax import Name, Raw
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from enum import Enum, Flag, IntEnum, IntFlag
|
||||
from typing_extensions import Literal, Self
|
||||
from typing import Literal
|
||||
from typing_extensions import Self
|
||||
|
||||
from .syntax import Name
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ from contextlib import _GeneratorContextManager
|
||||
from io import BytesIO
|
||||
from pathlib import PurePath
|
||||
from re import Pattern
|
||||
from typing import Any, ClassVar, NamedTuple, overload
|
||||
from typing_extensions import Final, Literal, TypeAlias, deprecated
|
||||
from typing import Any, ClassVar, Final, Literal, NamedTuple, overload
|
||||
from typing_extensions import TypeAlias, deprecated
|
||||
|
||||
from fpdf import ViewerPreferences
|
||||
from PIL import Image
|
||||
|
||||
@@ -2,8 +2,7 @@ from _typeshed import Incomplete, SupportsKeysAndGetItem, Unused
|
||||
from collections.abc import Callable, Iterable
|
||||
from html.parser import HTMLParser
|
||||
from logging import Logger
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Final
|
||||
from typing import ClassVar, Final
|
||||
|
||||
from fpdf import FPDF
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from _typeshed import Incomplete
|
||||
from dataclasses import dataclass
|
||||
from typing import Any
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing import Any, Literal
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from fpdf.enums import Align
|
||||
from fpdf.fpdf import FPDF
|
||||
|
||||
@@ -3,8 +3,8 @@ from dataclasses import dataclass
|
||||
from io import BytesIO
|
||||
from logging import Logger
|
||||
from types import TracebackType
|
||||
from typing import Any
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing import Any, Literal
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from PIL import Image
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable, Sequence
|
||||
from typing import NamedTuple
|
||||
from typing_extensions import Final
|
||||
from typing import Final, NamedTuple
|
||||
|
||||
from .enums import Align, WrapMode
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing_extensions import Final
|
||||
from typing import Final
|
||||
|
||||
from .encryption import StandardSecurityHandler
|
||||
from .output import ContentWithoutID, OutputProducer
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from _typeshed import Incomplete, Unused
|
||||
from collections import defaultdict
|
||||
from logging import Logger
|
||||
from typing_extensions import Final
|
||||
from typing import Final
|
||||
|
||||
from .annotations import AnnotationDict
|
||||
from .encryption import StandardSecurityHandler
|
||||
|
||||
@@ -2,8 +2,7 @@ from _typeshed import Incomplete, Unused
|
||||
from collections.abc import Callable
|
||||
from logging import Logger
|
||||
from re import Pattern
|
||||
from typing import NamedTuple, overload
|
||||
from typing_extensions import Literal
|
||||
from typing import Literal, NamedTuple, overload
|
||||
|
||||
from ._fonttools_shims import BasePen, _TTGlyphSet
|
||||
from .drawing import ClippingPath, PaintedPath
|
||||
|
||||
@@ -2,8 +2,8 @@ import datetime
|
||||
from _typeshed import Incomplete, SupportsItems
|
||||
from abc import ABC, abstractmethod
|
||||
from re import Pattern
|
||||
from typing import ClassVar, TypeVar
|
||||
from typing_extensions import Literal, Self
|
||||
from typing import ClassVar, Literal, TypeVar
|
||||
from typing_extensions import Self
|
||||
|
||||
from .encryption import StandardSecurityHandler
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ from _typeshed import Incomplete
|
||||
from collections.abc import Iterable
|
||||
from dataclasses import dataclass
|
||||
from io import BytesIO
|
||||
from typing_extensions import Literal
|
||||
from typing import Literal
|
||||
|
||||
from PIL import Image
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from abc import ABC, abstractmethod
|
||||
from typing_extensions import Literal
|
||||
from typing import Literal
|
||||
|
||||
class Transition(ABC):
|
||||
@abstractmethod
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from collections.abc import Iterable
|
||||
from typing import Any, AnyStr, NamedTuple
|
||||
from typing_extensions import Final, Literal, TypeAlias
|
||||
from typing import Any, AnyStr, Final, Literal, NamedTuple
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
_Unit: TypeAlias = Literal["pt", "mm", "cm", "in"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user