Update typing_extensions imports in third-party stubs (#11245)

This commit is contained in:
Sebastian Rittau
2024-01-05 15:40:13 +01:00
committed by GitHub
parent 1b471a9a0a
commit b6eaadcfe5
488 changed files with 715 additions and 845 deletions

View File

@@ -1,4 +1,5 @@
from typing_extensions import Final, LiteralString
from typing import Final
from typing_extensions import LiteralString
from PyInstaller import compat as compat

View File

@@ -6,8 +6,8 @@ import sys
from _typeshed import FileDescriptorOrPath, StrOrBytesPath, StrPath, Unused
from collections.abc import Iterable, Mapping, Sequence
from types import CodeType
from typing import ClassVar
from typing_extensions import Final, Literal, TypeAlias
from typing import ClassVar, Final, Literal
from typing_extensions import TypeAlias
from PyInstaller.building import _PyiBlockCipher
from PyInstaller.building.build_main import Analysis

View File

@@ -1,7 +1,7 @@
# https://pyinstaller.org/en/stable/advanced-topics.html#the-toc-and-tree-classes
from collections.abc import Iterable, Sequence
from typing import ClassVar
from typing_extensions import Literal, LiteralString, Self, SupportsIndex, TypeAlias
from typing import ClassVar, Literal, SupportsIndex
from typing_extensions import LiteralString, Self, TypeAlias
_TypeCode: TypeAlias = Literal["DEPENDENCY", "SYMLINK", "DATA", "BINARY", "EXECUTABLE", "EXTENSION", "OPTION"]
_TOCTuple: TypeAlias = tuple[str, str | None, _TypeCode | None]

View File

@@ -2,8 +2,7 @@
from _typeshed import FileDescriptorOrPath, GenericPath
from collections.abc import Iterable
from types import ModuleType
from typing import AnyStr, overload
from typing_extensions import Final, Literal
from typing import AnyStr, Final, Literal, overload
strict_collect_mode: bool
is_64bits: Final[bool]

View File

@@ -5,7 +5,7 @@
from _typeshed import StrOrBytesPath
from collections.abc import Generator, Iterable
from types import CodeType
from typing_extensions import Literal
from typing import Literal
from PyInstaller.building.build_main import Analysis
from PyInstaller.building.datastruct import TOC

View File

@@ -2,8 +2,7 @@
from _typeshed import StrOrBytesPath, StrPath
from collections.abc import Callable, Iterable
from typing import Any
from typing_extensions import Final, Literal
from typing import Any, Final, Literal
from PyInstaller import HOMEPATH as HOMEPATH
from PyInstaller.depend.imphookapi import PostGraphAPI

View File

@@ -4,7 +4,7 @@ from _typeshed import StrOrBytesPath
from collections.abc import Iterable
from importlib.metadata import PackagePath as _PackagePath
from pathlib import Path
from typing_extensions import Final, TypedDict
from typing import Final, TypedDict
CONDA_ROOT: Final[Path]
CONDA_META_DIR: Final[Path]

View File

@@ -1,7 +1,7 @@
from _typeshed import SliceableBuffer
from collections.abc import Sequence
from typing import Protocol
from typing_extensions import Literal, TypeAlias
from typing import Literal, Protocol
from typing_extensions import TypeAlias
_FourIntSequence: TypeAlias = Sequence[int]
_TwoIntSequence: TypeAlias = Sequence[int]