mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-17 15:24:14 +08:00
Update typing_extensions imports in stdlib (#11244)
Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import sys
|
||||
import typing_extensions
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
from typing import Any, ClassVar, Literal
|
||||
|
||||
PyCF_ONLY_AST: Literal[1024]
|
||||
PyCF_TYPE_COMMENTS: Literal[4096]
|
||||
|
||||
@@ -2,8 +2,8 @@ import codecs
|
||||
import sys
|
||||
from _typeshed import ReadableBuffer
|
||||
from collections.abc import Callable
|
||||
from typing import overload
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing import Literal, overload
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
# This type is not exposed; it is defined in unicodeobject.c
|
||||
class _EncodingMap:
|
||||
|
||||
@@ -30,9 +30,9 @@ from typing import ( # noqa: Y022,Y038,Y057
|
||||
Sized as Sized,
|
||||
TypeVar,
|
||||
ValuesView as ValuesView,
|
||||
final,
|
||||
runtime_checkable,
|
||||
)
|
||||
from typing_extensions import final
|
||||
|
||||
__all__ = [
|
||||
"Awaitable",
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import sys
|
||||
from _typeshed import SupportsWrite
|
||||
from collections.abc import Iterable, Iterator
|
||||
from typing import Any
|
||||
from typing_extensions import Final, Literal, TypeAlias
|
||||
from typing import Any, Final, Literal
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
__version__: Final[str]
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import sys
|
||||
from _typeshed import ReadOnlyBuffer, SupportsRead
|
||||
from typing import IO, Any, NamedTuple, overload
|
||||
from typing_extensions import TypeAlias, final
|
||||
from typing import IO, Any, NamedTuple, final, overload
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
if sys.platform != "win32":
|
||||
# Handled by PyCurses_ConvertToChtype in _cursesmodule.c.
|
||||
|
||||
@@ -2,8 +2,8 @@ import numbers
|
||||
import sys
|
||||
from collections.abc import Container, Sequence
|
||||
from types import TracebackType
|
||||
from typing import Any, ClassVar, NamedTuple, overload
|
||||
from typing_extensions import Final, Literal, Self, TypeAlias
|
||||
from typing import Any, ClassVar, Final, Literal, NamedTuple, overload
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
_Decimal: TypeAlias = Decimal | int
|
||||
_DecimalNew: TypeAlias = Decimal | float | str | tuple[int, Sequence[int], int]
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from typing import Any, TypeVar
|
||||
from typing_extensions import Final
|
||||
from typing import Any, Final, TypeVar
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from collections.abc import Callable
|
||||
from typing import Any
|
||||
from typing_extensions import final
|
||||
from typing import Any, final
|
||||
|
||||
@final
|
||||
class make_encoder:
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import sys
|
||||
from _typeshed import SupportsGetItem
|
||||
from collections.abc import Callable, Container, Iterable, MutableMapping, MutableSequence, Sequence
|
||||
from typing import Any, AnyStr, Generic, Protocol, SupportsAbs, TypeVar, overload
|
||||
from typing_extensions import ParamSpec, SupportsIndex, TypeAlias, TypeVarTuple, Unpack, final
|
||||
from typing import Any, AnyStr, Generic, Protocol, SupportsAbs, SupportsIndex, TypeVar, final, overload
|
||||
from typing_extensions import ParamSpec, TypeAlias, TypeVarTuple, Unpack
|
||||
|
||||
_R = TypeVar("_R")
|
||||
_T = TypeVar("_T")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import sys
|
||||
from _typeshed import StrOrBytesPath
|
||||
from collections.abc import Callable, Sequence
|
||||
from typing_extensions import SupportsIndex
|
||||
from typing import SupportsIndex
|
||||
|
||||
if sys.platform != "win32":
|
||||
def cloexec_pipe() -> tuple[int, int]: ...
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from collections.abc import Iterable
|
||||
from typing import ClassVar, NoReturn
|
||||
from typing_extensions import Literal
|
||||
from typing import ClassVar, Literal, NoReturn
|
||||
|
||||
class Quitter:
|
||||
name: str
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import sys
|
||||
from typing_extensions import Literal
|
||||
from typing import Literal
|
||||
|
||||
SF_APPEND: Literal[0x00040000]
|
||||
SF_ARCHIVED: Literal[0x00010000]
|
||||
|
||||
@@ -3,8 +3,7 @@ from _typeshed import structseq
|
||||
from collections.abc import Callable
|
||||
from threading import Thread
|
||||
from types import TracebackType
|
||||
from typing import Any, NoReturn
|
||||
from typing_extensions import Final, final
|
||||
from typing import Any, Final, NoReturn, final
|
||||
|
||||
error = RuntimeError
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import sys
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal, final
|
||||
from typing import Any, ClassVar, Literal, final
|
||||
|
||||
# _tkinter is meant to be only used internally by tkinter, but some tkinter
|
||||
# functions e.g. return _tkinter.Tcl_Obj objects. Tcl_Obj represents a Tcl
|
||||
|
||||
@@ -7,8 +7,22 @@ from collections.abc import Awaitable, Callable, Iterable, Sequence, Set as Abst
|
||||
from dataclasses import Field
|
||||
from os import PathLike
|
||||
from types import FrameType, TracebackType
|
||||
from typing import Any, AnyStr, ClassVar, Generic, Protocol, SupportsFloat, SupportsInt, TypeVar, overload
|
||||
from typing_extensions import Buffer, Final, Literal, LiteralString, SupportsIndex, TypeAlias, final
|
||||
from typing import (
|
||||
Any,
|
||||
AnyStr,
|
||||
ClassVar,
|
||||
Final,
|
||||
Generic,
|
||||
Literal,
|
||||
Protocol,
|
||||
SupportsFloat,
|
||||
SupportsIndex,
|
||||
SupportsInt,
|
||||
TypeVar,
|
||||
final,
|
||||
overload,
|
||||
)
|
||||
from typing_extensions import Buffer, LiteralString, TypeAlias
|
||||
|
||||
_KT = TypeVar("_KT")
|
||||
_KT_co = TypeVar("_KT_co", covariant=True)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import sys
|
||||
from collections.abc import Callable
|
||||
from typing import Any, Generic, TypeVar, overload
|
||||
from typing_extensions import Self, final
|
||||
from typing import Any, Generic, TypeVar, final, overload
|
||||
from typing_extensions import Self
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
from types import GenericAlias
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import sys
|
||||
from _typeshed import ReadableBuffer
|
||||
from collections.abc import Sequence
|
||||
from typing import Any, NoReturn, overload
|
||||
from typing_extensions import Literal, final
|
||||
from typing import Any, Literal, NoReturn, final, overload
|
||||
|
||||
if sys.platform == "win32":
|
||||
ABOVE_NORMAL_PRIORITY_CLASS: Literal[0x8000]
|
||||
|
||||
@@ -2,8 +2,8 @@ import _typeshed
|
||||
import sys
|
||||
from _typeshed import SupportsWrite
|
||||
from collections.abc import Callable
|
||||
from typing import Any, TypeVar
|
||||
from typing_extensions import Concatenate, Literal, ParamSpec
|
||||
from typing import Any, Literal, TypeVar
|
||||
from typing_extensions import Concatenate, ParamSpec
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_R_co = TypeVar("_R_co", covariant=True)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import sys
|
||||
from types import TracebackType
|
||||
from typing import IO, Any, NamedTuple, overload
|
||||
from typing_extensions import Literal, Self, TypeAlias
|
||||
from typing import IO, Any, Literal, NamedTuple, overload
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
__all__ = ["Error", "open"]
|
||||
|
||||
@@ -2,8 +2,8 @@ import sys
|
||||
from _typeshed import sentinel
|
||||
from collections.abc import Callable, Generator, Iterable, Sequence
|
||||
from re import Pattern
|
||||
from typing import IO, Any, Generic, NewType, NoReturn, Protocol, TypeVar, overload
|
||||
from typing_extensions import Literal, Self, TypeAlias
|
||||
from typing import IO, Any, Generic, Literal, NewType, NoReturn, Protocol, TypeVar, overload
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
__all__ = [
|
||||
"ArgumentParser",
|
||||
|
||||
@@ -3,8 +3,8 @@ from _typeshed import ReadableBuffer, SupportsRead, SupportsWrite
|
||||
from collections.abc import Iterable
|
||||
|
||||
# pytype crashes if array inherits from collections.abc.MutableSequence instead of typing.MutableSequence
|
||||
from typing import Any, MutableSequence, TypeVar, overload # noqa: Y022
|
||||
from typing_extensions import Literal, Self, SupportsIndex, TypeAlias
|
||||
from typing import Any, Literal, MutableSequence, SupportsIndex, TypeVar, overload # noqa: Y022
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
if sys.version_info >= (3, 12):
|
||||
from types import GenericAlias
|
||||
|
||||
@@ -3,8 +3,8 @@ import sys
|
||||
from _ast import *
|
||||
from _typeshed import ReadableBuffer, Unused
|
||||
from collections.abc import Iterator
|
||||
from typing import Any, TypeVar as _TypeVar, overload
|
||||
from typing_extensions import Literal, deprecated
|
||||
from typing import Any, Literal, TypeVar as _TypeVar, overload
|
||||
from typing_extensions import deprecated
|
||||
|
||||
class _ABC(type):
|
||||
if sys.version_info >= (3, 9):
|
||||
|
||||
@@ -10,8 +10,8 @@ from asyncio.transports import BaseTransport, DatagramTransport, ReadTransport,
|
||||
from collections.abc import Callable, Iterable, Sequence
|
||||
from contextvars import Context
|
||||
from socket import AddressFamily, SocketKind, _Address, _RetAddress, socket
|
||||
from typing import IO, Any, TypeVar, overload
|
||||
from typing_extensions import Literal, TypeAlias, TypeVarTuple, Unpack
|
||||
from typing import IO, Any, Literal, TypeVar, overload
|
||||
from typing_extensions import TypeAlias, TypeVarTuple, Unpack
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
__all__ = ("BaseEventLoop", "Server")
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
from collections.abc import Callable, Sequence
|
||||
from contextvars import Context
|
||||
from typing import Any
|
||||
from typing_extensions import Literal
|
||||
from typing import Any, Literal
|
||||
|
||||
from . import futures
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import enum
|
||||
import sys
|
||||
from typing_extensions import Literal
|
||||
from typing import Literal
|
||||
|
||||
LOG_THRESHOLD_FOR_CONNLOST_WRITES: Literal[5]
|
||||
ACCEPT_RETRY_DELAY: Literal[1]
|
||||
|
||||
@@ -5,8 +5,8 @@ from abc import ABCMeta, abstractmethod
|
||||
from collections.abc import Callable, Coroutine, Generator, Sequence
|
||||
from contextvars import Context
|
||||
from socket import AddressFamily, SocketKind, _Address, _RetAddress, socket
|
||||
from typing import IO, Any, Protocol, TypeVar, overload
|
||||
from typing_extensions import Literal, Self, TypeAlias, TypeVarTuple, Unpack, deprecated
|
||||
from typing import IO, Any, Literal, Protocol, TypeVar, overload
|
||||
from typing_extensions import Self, TypeAlias, TypeVarTuple, Unpack, deprecated
|
||||
|
||||
from . import _AwaitableLike, _CoroutineLike
|
||||
from .base_events import Server
|
||||
|
||||
@@ -2,8 +2,8 @@ import sys
|
||||
from collections.abc import Awaitable, Callable, Generator, Iterable
|
||||
from concurrent.futures._base import Future as _ConcurrentFuture
|
||||
from contextvars import Context
|
||||
from typing import Any, TypeVar
|
||||
from typing_extensions import Literal, Self, TypeGuard
|
||||
from typing import Any, Literal, TypeVar
|
||||
from typing_extensions import Self, TypeGuard
|
||||
|
||||
from .events import AbstractEventLoop
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ from _typeshed import Unused
|
||||
from collections import deque
|
||||
from collections.abc import Callable, Generator
|
||||
from types import TracebackType
|
||||
from typing import Any, TypeVar
|
||||
from typing_extensions import Literal, Self
|
||||
from typing import Any, Literal, TypeVar
|
||||
from typing_extensions import Self
|
||||
|
||||
from .events import AbstractEventLoop
|
||||
from .futures import Future
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import sys
|
||||
from collections.abc import Mapping
|
||||
from socket import socket
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
from typing import Any, ClassVar, Literal
|
||||
|
||||
from . import base_events, constants, events, futures, streams, transports
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ import sys
|
||||
from _typeshed import Unused
|
||||
from collections.abc import Callable, Coroutine
|
||||
from contextvars import Context
|
||||
from typing import Any, TypeVar
|
||||
from typing_extensions import Self, final
|
||||
from typing import Any, TypeVar, final
|
||||
from typing_extensions import Self
|
||||
|
||||
from .events import AbstractEventLoop
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ import sys
|
||||
from collections import deque
|
||||
from collections.abc import Callable
|
||||
from enum import Enum
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing import Any, ClassVar, Literal
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from . import constants, events, futures, protocols, transports
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ import ssl
|
||||
import sys
|
||||
from _typeshed import StrPath
|
||||
from collections.abc import AsyncIterator, Awaitable, Callable, Iterable, Sequence
|
||||
from typing import Any
|
||||
from typing_extensions import Self, SupportsIndex, TypeAlias
|
||||
from typing import Any, SupportsIndex
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
from . import events, protocols, transports
|
||||
from .base_events import Server
|
||||
|
||||
@@ -3,8 +3,7 @@ import sys
|
||||
from _typeshed import StrOrBytesPath
|
||||
from asyncio import events, protocols, streams, transports
|
||||
from collections.abc import Callable, Collection
|
||||
from typing import IO, Any
|
||||
from typing_extensions import Literal
|
||||
from typing import IO, Any, Literal
|
||||
|
||||
__all__ = ("create_subprocess_exec", "create_subprocess_shell")
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ import concurrent.futures
|
||||
import sys
|
||||
from collections.abc import Awaitable, Coroutine, Generator, Iterable, Iterator
|
||||
from types import FrameType
|
||||
from typing import Any, Protocol, TextIO, TypeVar, overload
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing import Any, Literal, Protocol, TextIO, TypeVar, overload
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from . import _CoroutineLike
|
||||
from .events import AbstractEventLoop
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from types import TracebackType
|
||||
from typing_extensions import Self, final
|
||||
from typing import final
|
||||
from typing_extensions import Self
|
||||
|
||||
__all__ = ("Timeout", "timeout", "timeout_at")
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@ import sys
|
||||
import types
|
||||
from abc import ABCMeta, abstractmethod
|
||||
from collections.abc import Callable
|
||||
from typing_extensions import Literal, Self, TypeVarTuple, Unpack, deprecated
|
||||
from typing import Literal
|
||||
from typing_extensions import Self, TypeVarTuple, Unpack, deprecated
|
||||
|
||||
from .events import AbstractEventLoop, BaseDefaultEventLoopPolicy
|
||||
from .selector_events import BaseSelectorEventLoop
|
||||
|
||||
@@ -2,8 +2,7 @@ import socket
|
||||
import sys
|
||||
from _typeshed import Incomplete, ReadableBuffer, WriteableBuffer
|
||||
from collections.abc import Callable
|
||||
from typing import IO, Any, ClassVar, NoReturn
|
||||
from typing_extensions import Literal
|
||||
from typing import IO, Any, ClassVar, Literal, NoReturn
|
||||
|
||||
from . import events, futures, proactor_events, selector_events, streams, windows_utils
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ import subprocess
|
||||
import sys
|
||||
from collections.abc import Callable
|
||||
from types import TracebackType
|
||||
from typing import Any, AnyStr
|
||||
from typing_extensions import Literal, Self
|
||||
from typing import Any, AnyStr, Literal
|
||||
from typing_extensions import Self
|
||||
|
||||
if sys.platform == "win32":
|
||||
__all__ = ("pipe", "Popen", "PIPE", "PipeHandle")
|
||||
|
||||
@@ -2,8 +2,8 @@ import sys
|
||||
from _typeshed import ExcInfo, TraceFunction
|
||||
from collections.abc import Callable, Iterable, Mapping
|
||||
from types import CodeType, FrameType, TracebackType
|
||||
from typing import IO, Any, SupportsInt, TypeVar
|
||||
from typing_extensions import Literal, ParamSpec
|
||||
from typing import IO, Any, Literal, SupportsInt, TypeVar
|
||||
from typing_extensions import ParamSpec
|
||||
|
||||
__all__ = ["BdbQuit", "Bdb", "Breakpoint"]
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from _typeshed import SizedBuffer
|
||||
from typing import IO, Any
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing import IO, Any, Literal
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
__all__ = ["binhex", "hexbin", "Error"]
|
||||
|
||||
|
||||
@@ -50,23 +50,13 @@ from typing import ( # noqa: Y022
|
||||
SupportsBytes,
|
||||
SupportsComplex,
|
||||
SupportsFloat,
|
||||
SupportsIndex,
|
||||
TypeVar,
|
||||
final,
|
||||
overload,
|
||||
type_check_only,
|
||||
)
|
||||
from typing_extensions import (
|
||||
Concatenate,
|
||||
Literal,
|
||||
LiteralString,
|
||||
ParamSpec,
|
||||
Self,
|
||||
SupportsIndex,
|
||||
TypeAlias,
|
||||
TypeGuard,
|
||||
TypeVarTuple,
|
||||
deprecated,
|
||||
final,
|
||||
)
|
||||
from typing_extensions import Concatenate, Literal, LiteralString, ParamSpec, Self, TypeAlias, TypeGuard, TypeVarTuple, deprecated
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
from types import GenericAlias
|
||||
|
||||
@@ -3,8 +3,8 @@ import sys
|
||||
from _compression import BaseStream
|
||||
from _typeshed import ReadableBuffer, StrOrBytesPath, WriteableBuffer
|
||||
from collections.abc import Iterable
|
||||
from typing import IO, Any, Protocol, TextIO, overload
|
||||
from typing_extensions import Literal, Self, SupportsIndex, TypeAlias, final
|
||||
from typing import IO, Any, Literal, Protocol, SupportsIndex, TextIO, final, overload
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
__all__ = ["BZ2File", "BZ2Compressor", "BZ2Decompressor", "open", "compress", "decompress"]
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ import sys
|
||||
from _typeshed import Unused
|
||||
from collections.abc import Iterable, Sequence
|
||||
from time import struct_time
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing import ClassVar, Literal
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
__all__ = [
|
||||
"IllegalMonthError",
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
from _typeshed import OptExcInfo, StrOrBytesPath
|
||||
from collections.abc import Callable
|
||||
from types import FrameType, TracebackType
|
||||
from typing import IO, Any
|
||||
from typing_extensions import Final
|
||||
from typing import IO, Any, Final
|
||||
|
||||
__UNDEF__: Final[object] # undocumented sentinel
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from collections.abc import Callable
|
||||
from typing import IO, Any
|
||||
from typing_extensions import Literal
|
||||
from typing import IO, Any, Literal
|
||||
|
||||
__all__ = ["Cmd"]
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ from _codecs import *
|
||||
from _typeshed import ReadableBuffer
|
||||
from abc import abstractmethod
|
||||
from collections.abc import Callable, Generator, Iterable
|
||||
from typing import Any, BinaryIO, Protocol, TextIO
|
||||
from typing_extensions import Literal, Self
|
||||
from typing import Any, BinaryIO, Literal, Protocol, TextIO
|
||||
from typing_extensions import Self
|
||||
|
||||
__all__ = [
|
||||
"register",
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import sys
|
||||
from _collections_abc import dict_items, dict_keys, dict_values
|
||||
from _typeshed import SupportsItems, SupportsKeysAndGetItem, SupportsRichComparison, SupportsRichComparisonT
|
||||
from typing import Any, Generic, NoReturn, TypeVar, overload
|
||||
from typing_extensions import Self, SupportsIndex, final
|
||||
from typing import Any, Generic, NoReturn, SupportsIndex, TypeVar, final, overload
|
||||
from typing_extensions import Self
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
from types import GenericAlias
|
||||
|
||||
@@ -4,8 +4,8 @@ from _typeshed import Unused
|
||||
from collections.abc import Callable, Iterable, Iterator
|
||||
from logging import Logger
|
||||
from types import TracebackType
|
||||
from typing import Any, Generic, NamedTuple, TypeVar
|
||||
from typing_extensions import Literal, ParamSpec, Self
|
||||
from typing import Any, Generic, Literal, NamedTuple, TypeVar
|
||||
from typing_extensions import ParamSpec, Self
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
from types import GenericAlias
|
||||
|
||||
@@ -2,8 +2,8 @@ import sys
|
||||
from _typeshed import StrOrBytesPath, SupportsWrite
|
||||
from collections.abc import Callable, ItemsView, Iterable, Iterator, Mapping, MutableMapping, Sequence
|
||||
from re import Pattern
|
||||
from typing import Any, ClassVar, TypeVar, overload
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing import Any, ClassVar, Literal, TypeVar, overload
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
if sys.version_info >= (3, 12):
|
||||
__all__ = (
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import sys
|
||||
from collections.abc import Callable, Iterator, Mapping
|
||||
from typing import Any, ClassVar, Generic, TypeVar, overload
|
||||
from typing_extensions import ParamSpec, final
|
||||
from typing import Any, ClassVar, Generic, TypeVar, final, overload
|
||||
from typing_extensions import ParamSpec
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
from types import GenericAlias
|
||||
|
||||
@@ -27,8 +27,8 @@ if sys.version_info >= (3, 12):
|
||||
|
||||
from _typeshed import SupportsWrite
|
||||
from collections.abc import Collection, Iterable, Iterator, Mapping, Sequence
|
||||
from typing import Any, Generic, TypeVar, overload
|
||||
from typing_extensions import Literal, Self
|
||||
from typing import Any, Generic, Literal, TypeVar, overload
|
||||
from typing_extensions import Self
|
||||
|
||||
if sys.version_info >= (3, 12):
|
||||
from types import GenericAlias
|
||||
|
||||
@@ -4,8 +4,8 @@ import types
|
||||
from _typeshed import DataclassInstance
|
||||
from builtins import type as Type # alias to avoid name clashes with fields named "type"
|
||||
from collections.abc import Callable, Iterable, Mapping
|
||||
from typing import Any, Generic, Protocol, TypeVar, overload
|
||||
from typing_extensions import Literal, TypeAlias, TypeGuard
|
||||
from typing import Any, Generic, Literal, Protocol, TypeVar, overload
|
||||
from typing_extensions import TypeAlias, TypeGuard
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
from types import GenericAlias
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import sys
|
||||
from abc import abstractmethod
|
||||
from time import struct_time
|
||||
from typing import ClassVar, NamedTuple, NoReturn, TypeVar, overload
|
||||
from typing_extensions import Literal, Self, SupportsIndex, TypeAlias, final
|
||||
from typing import ClassVar, Literal, NamedTuple, NoReturn, SupportsIndex, TypeVar, final, overload
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
__all__ = ("date", "datetime", "time", "timedelta", "timezone", "tzinfo", "MINYEAR", "MAXYEAR", "UTC")
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from collections.abc import Iterator, MutableMapping
|
||||
from types import TracebackType
|
||||
from typing_extensions import Literal, Self, TypeAlias
|
||||
from typing import Literal
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
__all__ = ["open", "whichdb", "error"]
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from distutils.unixccompiler import UnixCCompiler
|
||||
from distutils.version import LooseVersion
|
||||
from re import Pattern
|
||||
from typing_extensions import Literal
|
||||
from typing import Literal
|
||||
|
||||
def get_msvcr() -> list[str] | None: ...
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
from collections.abc import Iterable
|
||||
from re import Pattern
|
||||
from typing import overload
|
||||
from typing_extensions import Literal
|
||||
from typing import Literal, overload
|
||||
|
||||
# class is entirely undocumented
|
||||
class FileList:
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
from _typeshed import StrPath, Unused
|
||||
from collections.abc import Callable, Container, Iterable, Mapping
|
||||
from typing import Any
|
||||
from typing_extensions import Literal
|
||||
from typing import Any, Literal
|
||||
|
||||
def get_host_platform() -> str: ...
|
||||
def get_platform() -> str: ...
|
||||
|
||||
@@ -2,8 +2,8 @@ from collections.abc import Iterable, Iterator
|
||||
from email.errors import HeaderParseError, MessageDefect
|
||||
from email.policy import Policy
|
||||
from re import Pattern
|
||||
from typing import Any
|
||||
from typing_extensions import Final, Self
|
||||
from typing import Any, Final
|
||||
from typing_extensions import Self
|
||||
|
||||
WSP: Final[set[str]]
|
||||
CFWS_LEADER: Final[set[str]]
|
||||
|
||||
@@ -13,8 +13,8 @@ from email._header_value_parser import (
|
||||
)
|
||||
from email.errors import MessageDefect
|
||||
from email.policy import Policy
|
||||
from typing import Any, ClassVar, Protocol
|
||||
from typing_extensions import Literal, Self
|
||||
from typing import Any, ClassVar, Literal, Protocol
|
||||
from typing_extensions import Self
|
||||
|
||||
class BaseHeader(str):
|
||||
# max_count is actually more of an abstract ClassVar (not defined on the base class, but expected to be defined in subclasses)
|
||||
|
||||
@@ -5,8 +5,8 @@ from email.contentmanager import ContentManager
|
||||
from email.errors import MessageDefect
|
||||
from email.header import Header
|
||||
from email.policy import Policy
|
||||
from typing import Any, Protocol, TypeVar, overload
|
||||
from typing_extensions import Literal, Self, TypeAlias
|
||||
from typing import Any, Literal, Protocol, TypeVar, overload
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
__all__ = ["Message", "EmailMessage"]
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ import types
|
||||
from _typeshed import SupportsKeysAndGetItem, Unused
|
||||
from builtins import property as _builtins_property
|
||||
from collections.abc import Callable, Iterable, Iterator, Mapping
|
||||
from typing import Any, Generic, TypeVar, overload
|
||||
from typing_extensions import Literal, Self, TypeAlias
|
||||
from typing import Any, Generic, Literal, TypeVar, overload
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
__all__ = ["EnumMeta", "Enum", "IntEnum", "Flag", "IntFlag", "auto", "unique"]
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import sys
|
||||
from _typeshed import FileDescriptorLike, ReadOnlyBuffer, WriteableBuffer
|
||||
from typing import Any, overload
|
||||
from typing_extensions import Buffer, Literal
|
||||
from typing import Any, Literal, overload
|
||||
from typing_extensions import Buffer
|
||||
|
||||
if sys.platform != "win32":
|
||||
FASYNC: int
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import sys
|
||||
from _typeshed import GenericPath, StrOrBytesPath
|
||||
from collections.abc import Callable, Iterable, Sequence
|
||||
from typing import Any, AnyStr, Generic
|
||||
from typing_extensions import Literal
|
||||
from typing import Any, AnyStr, Generic, Literal
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
from types import GenericAlias
|
||||
|
||||
@@ -2,8 +2,8 @@ import sys
|
||||
from _typeshed import AnyStr_co, StrOrBytesPath
|
||||
from collections.abc import Callable, Iterable, Iterator
|
||||
from types import TracebackType
|
||||
from typing import IO, Any, AnyStr, Protocol, overload
|
||||
from typing_extensions import Literal, Self, TypeAlias
|
||||
from typing import IO, Any, AnyStr, Literal, Protocol, overload
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
from types import GenericAlias
|
||||
|
||||
@@ -2,8 +2,8 @@ import sys
|
||||
from collections.abc import Callable
|
||||
from decimal import Decimal
|
||||
from numbers import Integral, Rational, Real
|
||||
from typing import Any, overload
|
||||
from typing_extensions import Literal, Self, SupportsIndex, TypeAlias
|
||||
from typing import Any, Literal, SupportsIndex, overload
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
_ComparableNum: TypeAlias = int | float | Decimal | Real
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ from collections.abc import Callable, Iterable, Iterator
|
||||
from socket import socket
|
||||
from ssl import SSLContext
|
||||
from types import TracebackType
|
||||
from typing import Any, TextIO
|
||||
from typing_extensions import Literal, Self
|
||||
from typing import Any, Literal, TextIO
|
||||
from typing_extensions import Self
|
||||
|
||||
__all__ = ["FTP", "error_reply", "error_temp", "error_perm", "error_proto", "all_errors", "FTP_TLS"]
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ import sys
|
||||
import types
|
||||
from _typeshed import SupportsAllComparisons, SupportsItems
|
||||
from collections.abc import Callable, Hashable, Iterable, Sequence, Sized
|
||||
from typing import Any, Generic, NamedTuple, TypeVar, overload
|
||||
from typing_extensions import Literal, ParamSpec, Self, TypeAlias, TypedDict, final
|
||||
from typing import Any, Generic, Literal, NamedTuple, TypedDict, TypeVar, final, overload
|
||||
from typing_extensions import ParamSpec, Self, TypeAlias
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
from types import GenericAlias
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import sys
|
||||
from collections.abc import Callable
|
||||
from typing import Any
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing import Any, Literal
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
DEBUG_COLLECTABLE: Literal[2]
|
||||
DEBUG_LEAK: Literal[38]
|
||||
|
||||
@@ -2,8 +2,8 @@ import os
|
||||
import sys
|
||||
from _typeshed import BytesPath, FileDescriptorOrPath, StrOrBytesPath, StrPath, SupportsRichComparisonT
|
||||
from collections.abc import Sequence
|
||||
from typing import overload
|
||||
from typing_extensions import Literal, LiteralString
|
||||
from typing import Literal, overload
|
||||
from typing_extensions import LiteralString
|
||||
|
||||
__all__ = [
|
||||
"commonprefix",
|
||||
|
||||
@@ -2,8 +2,7 @@ import io
|
||||
import sys
|
||||
from _typeshed import StrPath
|
||||
from collections.abc import Callable, Container, Iterable, Sequence
|
||||
from typing import Any, Protocol, TypeVar, overload
|
||||
from typing_extensions import Final, Literal
|
||||
from typing import Any, Final, Literal, Protocol, TypeVar, overload
|
||||
|
||||
__all__ = [
|
||||
"NullTranslations",
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import sys
|
||||
from _typeshed import structseq
|
||||
from typing import Any
|
||||
from typing_extensions import Final, final
|
||||
from typing import Any, Final, final
|
||||
|
||||
if sys.platform != "win32":
|
||||
@final
|
||||
|
||||
@@ -3,8 +3,8 @@ import sys
|
||||
import zlib
|
||||
from _typeshed import ReadableBuffer, SizedBuffer, StrOrBytesPath
|
||||
from io import FileIO
|
||||
from typing import Protocol, TextIO, overload
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing import Literal, Protocol, TextIO, overload
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
__all__ = ["BadGzipFile", "GzipFile", "open", "compress", "decompress"]
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import sys
|
||||
from _typeshed import ReadableBuffer
|
||||
from collections.abc import Callable, Set as AbstractSet
|
||||
from typing import Protocol
|
||||
from typing_extensions import Self, final
|
||||
from typing import Protocol, final
|
||||
from typing_extensions import Self
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
__all__ = (
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
from _heapq import *
|
||||
from _typeshed import SupportsRichComparison
|
||||
from collections.abc import Callable, Iterable
|
||||
from typing import Any, TypeVar
|
||||
from typing_extensions import Final
|
||||
from typing import Any, Final, TypeVar
|
||||
|
||||
__all__ = ["heappush", "heappop", "heapify", "heapreplace", "merge", "nlargest", "nsmallest", "heappushpop"]
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import sys
|
||||
from enum import IntEnum
|
||||
from typing_extensions import Literal
|
||||
from typing import Literal
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
from enum import StrEnum
|
||||
|
||||
@@ -9,8 +9,8 @@ from re import Pattern
|
||||
from socket import socket as _socket
|
||||
from ssl import SSLContext, SSLSocket
|
||||
from types import TracebackType
|
||||
from typing import IO, Any, SupportsAbs, SupportsInt
|
||||
from typing_extensions import Literal, Self, TypeAlias
|
||||
from typing import IO, Any, Literal, SupportsAbs, SupportsInt
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
__all__ = ["IMAP4", "IMAP4_stream", "Internaldate2tuple", "Int2AP", "ParseFlags", "Time2Internaldate", "IMAP4_SSL"]
|
||||
|
||||
|
||||
@@ -6,8 +6,7 @@ from abc import ABCMeta, abstractmethod
|
||||
from collections.abc import Iterator, Mapping, Sequence
|
||||
from importlib.machinery import ModuleSpec
|
||||
from io import BufferedReader
|
||||
from typing import IO, Any, Protocol, overload, runtime_checkable
|
||||
from typing_extensions import Literal
|
||||
from typing import IO, Any, Literal, Protocol, overload, runtime_checkable
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
__all__ = [
|
||||
|
||||
@@ -4,8 +4,8 @@ import types
|
||||
from _typeshed import ReadableBuffer
|
||||
from collections.abc import Callable, Iterable, MutableSequence, Sequence
|
||||
from importlib.metadata import DistributionFinder, PathDistribution
|
||||
from typing import Any
|
||||
from typing_extensions import Literal, deprecated
|
||||
from typing import Any, Literal
|
||||
from typing_extensions import deprecated
|
||||
|
||||
class ModuleSpec:
|
||||
def __init__(
|
||||
|
||||
@@ -8,8 +8,8 @@ import zipfile
|
||||
from _typeshed import Incomplete, StrPath
|
||||
from collections.abc import Iterable, Iterator
|
||||
from io import BufferedReader
|
||||
from typing import NoReturn, TypeVar
|
||||
from typing_extensions import Literal, Never
|
||||
from typing import Literal, NoReturn, TypeVar
|
||||
from typing_extensions import Never
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
import importlib.resources.abc as abc
|
||||
|
||||
@@ -3,8 +3,8 @@ import sys
|
||||
from _typeshed import Incomplete, OpenBinaryMode, OpenTextMode, Unused
|
||||
from collections.abc import Iterator
|
||||
from io import TextIOWrapper
|
||||
from typing import IO, Any, BinaryIO, NoReturn, overload
|
||||
from typing_extensions import Literal, Never
|
||||
from typing import IO, Any, BinaryIO, Literal, NoReturn, overload
|
||||
from typing_extensions import Never
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
from .abc import Traversable, TraversableResources
|
||||
|
||||
@@ -25,8 +25,8 @@ from types import (
|
||||
TracebackType,
|
||||
WrapperDescriptorType,
|
||||
)
|
||||
from typing import Any, ClassVar, NamedTuple, Protocol, TypeVar, overload
|
||||
from typing_extensions import Literal, ParamSpec, Self, TypeAlias, TypeGuard
|
||||
from typing import Any, ClassVar, Literal, NamedTuple, Protocol, TypeVar, overload
|
||||
from typing_extensions import ParamSpec, Self, TypeAlias, TypeGuard
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
__all__ = [
|
||||
|
||||
@@ -6,8 +6,8 @@ from _typeshed import FileDescriptorOrPath, ReadableBuffer, WriteableBuffer
|
||||
from collections.abc import Callable, Iterable, Iterator
|
||||
from os import _Opener
|
||||
from types import TracebackType
|
||||
from typing import IO, Any, BinaryIO, TextIO, TypeVar, overload
|
||||
from typing_extensions import Literal, Self
|
||||
from typing import IO, Any, BinaryIO, Literal, TextIO, TypeVar, overload
|
||||
from typing_extensions import Self
|
||||
|
||||
__all__ = [
|
||||
"BlockingIOError",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import sys
|
||||
from collections.abc import Iterable, Iterator
|
||||
from typing import Any, Generic, SupportsInt, TypeVar, overload
|
||||
from typing_extensions import Literal, Self, TypeAlias
|
||||
from typing import Any, Generic, Literal, SupportsInt, TypeVar, overload
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
# Undocumented length constants
|
||||
IPV4LENGTH: Literal[32]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import sys
|
||||
from collections.abc import Callable, Iterable, Iterator
|
||||
from typing import Any, Generic, SupportsComplex, SupportsFloat, SupportsInt, TypeVar, overload
|
||||
from typing_extensions import Literal, Self, SupportsIndex, TypeAlias
|
||||
from typing import Any, Generic, Literal, SupportsComplex, SupportsFloat, SupportsIndex, SupportsInt, TypeVar, overload
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
from types import GenericAlias
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import sys
|
||||
from collections.abc import Sequence
|
||||
from typing_extensions import Final
|
||||
from typing import Final
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
__all__ = ["iskeyword", "issoftkeyword", "kwlist", "softkwlist"]
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
from _typeshed import Incomplete, StrPath
|
||||
from abc import ABCMeta, abstractmethod
|
||||
from collections.abc import MutableMapping
|
||||
from typing import ClassVar, TypeVar
|
||||
from typing_extensions import Literal
|
||||
from typing import ClassVar, Literal, TypeVar
|
||||
|
||||
from .pytree import Base, Leaf, Node
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Literal
|
||||
from typing import ClassVar, Literal
|
||||
|
||||
from .. import fixer_base
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Literal
|
||||
from typing import ClassVar, Literal
|
||||
|
||||
from ..fixer_base import BaseFix
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Literal
|
||||
from typing import ClassVar, Literal
|
||||
|
||||
from .. import fixer_base
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Literal
|
||||
from typing import ClassVar, Literal
|
||||
|
||||
from .. import fixer_base
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Literal
|
||||
from typing import ClassVar, Literal
|
||||
|
||||
from .. import fixer_base
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from collections.abc import Generator, Iterable
|
||||
from typing import ClassVar, TypeVar
|
||||
from typing_extensions import Literal
|
||||
from typing import ClassVar, Literal, TypeVar
|
||||
|
||||
from .. import fixer_base
|
||||
from ..pytree import Base
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Literal
|
||||
from typing import ClassVar, Literal
|
||||
|
||||
from .. import fixer_base
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Literal
|
||||
from typing import ClassVar, Literal
|
||||
|
||||
from .. import fixer_base
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
from _typeshed import Incomplete, StrPath
|
||||
from lib2to3 import fixer_base
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Literal
|
||||
from typing import ClassVar, Literal
|
||||
|
||||
from ..pytree import Node
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Literal
|
||||
from typing import ClassVar, Literal
|
||||
|
||||
from .. import fixer_base
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Literal
|
||||
from typing import ClassVar, Literal
|
||||
|
||||
from .. import fixer_base
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Literal
|
||||
from typing import ClassVar, Literal
|
||||
|
||||
from .. import fixer_base
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Literal
|
||||
from typing import ClassVar, Literal
|
||||
|
||||
from .. import fixer_base
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Literal
|
||||
from typing import ClassVar, Literal
|
||||
|
||||
from .. import fixer_base
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user