From 4a859fdcbe03119c2ff606937e11539740421750 Mon Sep 17 00:00:00 2001 From: Akuli Date: Thu, 16 Dec 2021 20:01:25 +0200 Subject: [PATCH] fix syntax errors --- stdlib/_codecs.pyi | 2 +- stdlib/_csv.pyi | 2 +- stdlib/_typeshed/__init__.pyi | 2 +- stdlib/asyncio/base_subprocess.pyi | 2 +- stdlib/asyncio/streams.pyi | 2 +- stdlib/asyncio/subprocess.pyi | 2 +- stdlib/binhex.pyi | 2 +- stdlib/cmath.pyi | 2 +- stdlib/copyreg.pyi | 2 +- stdlib/dbm/__init__.pyi | 2 +- stdlib/dbm/dumb.pyi | 2 +- stdlib/dis.pyi | 2 +- stdlib/distutils/ccompiler.pyi | 2 +- stdlib/email/_header_value_parser.pyi | 2 +- stdlib/email/message.pyi | 2 +- stdlib/email/mime/application.pyi | 2 +- stdlib/email/mime/audio.pyi | 2 +- stdlib/email/mime/base.pyi | 2 +- stdlib/email/mime/image.pyi | 2 +- stdlib/email/mime/multipart.pyi | 2 +- stdlib/imaplib.pyi | 2 +- stdlib/importlib/resources.pyi | 2 +- stdlib/inspect.pyi | 2 +- stdlib/lib2to3/pytree.pyi | 2 +- stdlib/mailcap.pyi | 2 +- stdlib/multiprocessing/connection.pyi | 2 +- stdlib/multiprocessing/dummy/connection.pyi | 2 +- stdlib/multiprocessing/synchronize.pyi | 2 +- stdlib/nntplib.pyi | 2 +- stdlib/pickle.pyi | 2 +- stdlib/signal.pyi | 2 +- stdlib/socketserver.pyi | 2 +- stdlib/statistics.pyi | 2 +- stdlib/sunau.pyi | 2 +- stdlib/termios.pyi | 2 +- stdlib/timeit.pyi | 2 +- stdlib/tokenize.pyi | 2 +- stdlib/tty.pyi | 2 +- stdlib/unittest/result.pyi | 2 +- stdlib/unittest/suite.pyi | 2 +- stdlib/uu.pyi | 2 +- stdlib/wave.pyi | 2 +- stdlib/winreg.pyi | 2 +- stdlib/xml/dom/pulldom.pyi | 2 +- stdlib/xml/dom/xmlbuilder.pyi | 2 +- stdlib/xmlrpc/server.pyi | 2 +- stdlib/zipapp.pyi | 2 +- stubs/Pillow/PIL/Image.pyi | 2 +- stubs/Pillow/PIL/ImageColor.pyi | 2 +- stubs/Pillow/PIL/TiffTags.pyi | 2 +- stubs/PyYAML/yaml/constructor.pyi | 2 +- stubs/PyYAML/yaml/cyaml.pyi | 2 +- stubs/Pygments/pygments/lexers/__init__.pyi | 2 +- stubs/bleach/bleach/sanitizer.pyi | 2 +- stubs/colorama/colorama/ansitowin32.pyi | 2 +- stubs/croniter/croniter.pyi | 2 +- stubs/docopt/docopt.pyi | 2 +- stubs/paramiko/paramiko/common.pyi | 2 +- stubs/pyOpenSSL/OpenSSL/crypto.pyi | 2 +- stubs/pyaudio/pyaudio.pyi | 2 +- stubs/pysftp/pysftp/__init__.pyi | 2 +- stubs/python-dateutil/dateutil/parser/__init__.pyi | 2 +- stubs/python-dateutil/dateutil/parser/isoparser.pyi | 2 +- stubs/python-dateutil/dateutil/tz/tz.pyi | 2 +- stubs/requests/requests/sessions.pyi | 2 +- stubs/simplejson/simplejson/__init__.pyi | 2 +- stubs/tabulate/tabulate.pyi | 2 +- stubs/toml/toml.pyi | 2 +- 68 files changed, 68 insertions(+), 68 deletions(-) diff --git a/stdlib/_codecs.pyi b/stdlib/_codecs.pyi index 7a098a949269..6bc3951188ba 100644 --- a/stdlib/_codecs.pyi +++ b/stdlib/_codecs.pyi @@ -1,6 +1,6 @@ import codecs import sys -from typing import Any, Callable, Dict, Tuple, +from typing import Any, Callable, Dict, Tuple # This type is not exposed; it is defined in unicodeobject.c class _EncodingMap: diff --git a/stdlib/_csv.pyi b/stdlib/_csv.pyi index c06d74616161..c6d720e02c93 100644 --- a/stdlib/_csv.pyi +++ b/stdlib/_csv.pyi @@ -1,4 +1,4 @@ -from typing import Any, Iterable, Iterator, List, Protocol, Type, +from typing import Any, Iterable, Iterator, List, Protocol, Type QUOTE_ALL: int QUOTE_MINIMAL: int diff --git a/stdlib/_typeshed/__init__.pyi b/stdlib/_typeshed/__init__.pyi index 4fb46f6d97ff..8fbe512d75ca 100644 --- a/stdlib/_typeshed/__init__.pyi +++ b/stdlib/_typeshed/__init__.pyi @@ -7,7 +7,7 @@ import ctypes import mmap import sys from os import PathLike -from typing import AbstractSet, Any, Awaitable, Container, Iterable, Protocol, TypeVar, +from typing import AbstractSet, Any, Awaitable, Container, Iterable, Protocol, TypeVar from typing_extensions import Literal, final _KT = TypeVar("_KT") diff --git a/stdlib/asyncio/base_subprocess.pyi b/stdlib/asyncio/base_subprocess.pyi index 724a287ca158..6501a3eef86b 100644 --- a/stdlib/asyncio/base_subprocess.pyi +++ b/stdlib/asyncio/base_subprocess.pyi @@ -1,6 +1,6 @@ import subprocess from collections import deque -from typing import IO, Any, Callable, Sequence, Tuple, +from typing import IO, Any, Callable, Sequence, Tuple from . import events, futures, protocols, transports diff --git a/stdlib/asyncio/streams.pyi b/stdlib/asyncio/streams.pyi index 51f10efcff17..c4649f8c0a62 100644 --- a/stdlib/asyncio/streams.pyi +++ b/stdlib/asyncio/streams.pyi @@ -1,6 +1,6 @@ import sys from _typeshed import StrPath -from typing import Any, AsyncIterator, Awaitable, Callable, Iterable, +from typing import Any, AsyncIterator, Awaitable, Callable, Iterable from . import events, protocols, transports from .base_events import Server diff --git a/stdlib/asyncio/subprocess.pyi b/stdlib/asyncio/subprocess.pyi index 7752d42ba501..4a3d155899f9 100644 --- a/stdlib/asyncio/subprocess.pyi +++ b/stdlib/asyncio/subprocess.pyi @@ -2,7 +2,7 @@ import subprocess import sys from _typeshed import StrOrBytesPath from asyncio import events, protocols, streams, transports -from typing import IO, Any, Callable, +from typing import IO, Any, Callable from typing_extensions import Literal if sys.version_info >= (3, 8): diff --git a/stdlib/binhex.pyi b/stdlib/binhex.pyi index 7ebb1c2b1957..8383a028a6cd 100644 --- a/stdlib/binhex.pyi +++ b/stdlib/binhex.pyi @@ -1,4 +1,4 @@ -from typing import IO, Any, Tuple, +from typing import IO, Any, Tuple class Error(Exception): ... diff --git a/stdlib/cmath.pyi b/stdlib/cmath.pyi index f97161e7dcb3..ee51861fdaa0 100644 --- a/stdlib/cmath.pyi +++ b/stdlib/cmath.pyi @@ -1,5 +1,5 @@ import sys -from typing import SupportsComplex, SupportsFloat, +from typing import SupportsComplex, SupportsFloat if sys.version_info >= (3, 8): from typing import SupportsIndex diff --git a/stdlib/copyreg.pyi b/stdlib/copyreg.pyi index 8c83a3bbb49b..8700ccf6265a 100644 --- a/stdlib/copyreg.pyi +++ b/stdlib/copyreg.pyi @@ -1,4 +1,4 @@ -from typing import Any, Callable, Hashable, SupportsInt, Tuple, TypeVar, +from typing import Any, Callable, Hashable, SupportsInt, Tuple, TypeVar _TypeT = TypeVar("_TypeT", bound=type) _Reduce = Tuple[Callable[..., _TypeT], Tuple[Any, ...]] | Tuple[Callable[..., _TypeT], Tuple[Any, ...], Any | None] diff --git a/stdlib/dbm/__init__.pyi b/stdlib/dbm/__init__.pyi index 39653fbf78e5..80826851d933 100644 --- a/stdlib/dbm/__init__.pyi +++ b/stdlib/dbm/__init__.pyi @@ -1,6 +1,6 @@ from _typeshed import Self from types import TracebackType -from typing import Iterator, MutableMapping, Type, +from typing import Iterator, MutableMapping, Type from typing_extensions import Literal _KeyType = str | bytes diff --git a/stdlib/dbm/dumb.pyi b/stdlib/dbm/dumb.pyi index 8d63d4f85124..16c2cc826ef1 100644 --- a/stdlib/dbm/dumb.pyi +++ b/stdlib/dbm/dumb.pyi @@ -1,6 +1,6 @@ from _typeshed import Self from types import TracebackType -from typing import Iterator, MutableMapping, Type, +from typing import Iterator, MutableMapping, Type _KeyType = str | bytes _ValueType = str | bytes diff --git a/stdlib/dis.pyi b/stdlib/dis.pyi index a98f5c11fc17..b29f4810d1f9 100644 --- a/stdlib/dis.pyi +++ b/stdlib/dis.pyi @@ -16,7 +16,7 @@ from opcode import ( opname as opname, stack_effect as stack_effect, ) -from typing import IO, Any, Callable, Iterator, NamedTuple, +from typing import IO, Any, Callable, Iterator, NamedTuple # Strictly this should not have to include Callable, but mypy doesn't use FunctionType # for functions (python/mypy#3171) diff --git a/stdlib/distutils/ccompiler.pyi b/stdlib/distutils/ccompiler.pyi index be3cb80b54d3..f20f1b344e96 100644 --- a/stdlib/distutils/ccompiler.pyi +++ b/stdlib/distutils/ccompiler.pyi @@ -1,4 +1,4 @@ -from typing import Any, Callable, Tuple, +from typing import Any, Callable, Tuple _Macro = Tuple[str] | Tuple[str, str | None] diff --git a/stdlib/email/_header_value_parser.pyi b/stdlib/email/_header_value_parser.pyi index e8bff4435ea0..993413482ef2 100644 --- a/stdlib/email/_header_value_parser.pyi +++ b/stdlib/email/_header_value_parser.pyi @@ -1,7 +1,7 @@ import sys from email.errors import HeaderParseError, MessageDefect from email.policy import Policy -from typing import Any, Iterable, Iterator, List, Pattern, Type, TypeVar, +from typing import Any, Iterable, Iterator, List, Pattern, Type, TypeVar from typing_extensions import Final _T = TypeVar("_T") diff --git a/stdlib/email/message.pyi b/stdlib/email/message.pyi index 793b986c3250..9724b1c0aca3 100644 --- a/stdlib/email/message.pyi +++ b/stdlib/email/message.pyi @@ -2,7 +2,7 @@ from email.charset import Charset from email.contentmanager import ContentManager from email.errors import MessageDefect from email.policy import Policy -from typing import Any, Generator, Iterator, List, Sequence, Tuple, TypeVar, +from typing import Any, Generator, Iterator, List, Sequence, Tuple, TypeVar _T = TypeVar("_T") diff --git a/stdlib/email/mime/application.pyi b/stdlib/email/mime/application.pyi index 9ba62fb84da9..4aaf41dc5ff8 100644 --- a/stdlib/email/mime/application.pyi +++ b/stdlib/email/mime/application.pyi @@ -1,6 +1,6 @@ from email.mime.nonmultipart import MIMENonMultipart from email.policy import Policy -from typing import Callable, Tuple, +from typing import Callable, Tuple _ParamsType = str | None | Tuple[str, str | None, str] diff --git a/stdlib/email/mime/audio.pyi b/stdlib/email/mime/audio.pyi index 8d82b82eb345..24cefbf797cf 100644 --- a/stdlib/email/mime/audio.pyi +++ b/stdlib/email/mime/audio.pyi @@ -1,6 +1,6 @@ from email.mime.nonmultipart import MIMENonMultipart from email.policy import Policy -from typing import Callable, Tuple, +from typing import Callable, Tuple _ParamsType = str | None | Tuple[str, str | None, str] diff --git a/stdlib/email/mime/base.pyi b/stdlib/email/mime/base.pyi index c870eea780ec..a334fa4869c4 100644 --- a/stdlib/email/mime/base.pyi +++ b/stdlib/email/mime/base.pyi @@ -1,6 +1,6 @@ import email.message from email.policy import Policy -from typing import Tuple, +from typing import Tuple _ParamsType = str | None | Tuple[str, str | None, str] diff --git a/stdlib/email/mime/image.pyi b/stdlib/email/mime/image.pyi index daa1f3be3643..4c8ec4f24494 100644 --- a/stdlib/email/mime/image.pyi +++ b/stdlib/email/mime/image.pyi @@ -1,6 +1,6 @@ from email.mime.nonmultipart import MIMENonMultipart from email.policy import Policy -from typing import Callable, Tuple, +from typing import Callable, Tuple _ParamsType = str | None | Tuple[str, str | None, str] diff --git a/stdlib/email/mime/multipart.pyi b/stdlib/email/mime/multipart.pyi index 5dcdaadd7b83..75796dfc4305 100644 --- a/stdlib/email/mime/multipart.pyi +++ b/stdlib/email/mime/multipart.pyi @@ -1,7 +1,7 @@ from email.message import Message from email.mime.base import MIMEBase from email.policy import Policy -from typing import Sequence, Tuple, +from typing import Sequence, Tuple _ParamsType = str | None | Tuple[str, str | None, str] diff --git a/stdlib/imaplib.pyi b/stdlib/imaplib.pyi index d86ee35f0a05..5e0b1bb05dd0 100644 --- a/stdlib/imaplib.pyi +++ b/stdlib/imaplib.pyi @@ -5,7 +5,7 @@ from _typeshed import Self from socket import socket as _socket from ssl import SSLContext, SSLSocket from types import TracebackType -from typing import IO, Any, Callable, List, Pattern, Tuple, Type, +from typing import IO, Any, Callable, List, Pattern, Tuple, Type from typing_extensions import Literal # TODO: Commands should use their actual return types, not this type alias. diff --git a/stdlib/importlib/resources.pyi b/stdlib/importlib/resources.pyi index 6b4ec55839ea..f832e063e927 100644 --- a/stdlib/importlib/resources.pyi +++ b/stdlib/importlib/resources.pyi @@ -7,7 +7,7 @@ if sys.version_info >= (3, 7): from contextlib import AbstractContextManager from pathlib import Path from types import ModuleType - from typing import BinaryIO, Iterator, TextIO, + from typing import BinaryIO, Iterator, TextIO Package = str | ModuleType Resource = str | os.PathLike[Any] diff --git a/stdlib/inspect.pyi b/stdlib/inspect.pyi index d8a276a2b5b9..07b4fbfaa80f 100644 --- a/stdlib/inspect.pyi +++ b/stdlib/inspect.pyi @@ -23,7 +23,7 @@ from types import ( if sys.version_info >= (3, 7): from types import ClassMethodDescriptorType, WrapperDescriptorType, MemberDescriptorType, MethodDescriptorType -from typing import Any, ClassVar, NamedTuple, Protocol, Tuple, Type, TypeVar, +from typing import Any, ClassVar, NamedTuple, Protocol, Tuple, Type, TypeVar from typing_extensions import Literal, TypeGuard # diff --git a/stdlib/lib2to3/pytree.pyi b/stdlib/lib2to3/pytree.pyi index 2c534fc4761a..8f9a246f8f64 100644 --- a/stdlib/lib2to3/pytree.pyi +++ b/stdlib/lib2to3/pytree.pyi @@ -1,5 +1,5 @@ from lib2to3.pgen2.grammar import Grammar -from typing import Any, Callable, Dict, Iterator, List, Tuple, TypeVar, +from typing import Any, Callable, Dict, Iterator, List, Tuple, TypeVar _P = TypeVar("_P") _NL = Node | Leaf diff --git a/stdlib/mailcap.pyi b/stdlib/mailcap.pyi index 84620c438728..f72d819576a4 100644 --- a/stdlib/mailcap.pyi +++ b/stdlib/mailcap.pyi @@ -1,4 +1,4 @@ -from typing import Dict, Mapping, Sequence, +from typing import Dict, Mapping, Sequence _Cap = Dict[str, str | int] diff --git a/stdlib/multiprocessing/connection.pyi b/stdlib/multiprocessing/connection.pyi index af13c6f8b74c..0d5b521b0f2a 100644 --- a/stdlib/multiprocessing/connection.pyi +++ b/stdlib/multiprocessing/connection.pyi @@ -2,7 +2,7 @@ import socket import sys import types from _typeshed import Self -from typing import Any, Iterable, Tuple, Type, +from typing import Any, Iterable, Tuple, Type if sys.version_info >= (3, 8): from typing import SupportsIndex diff --git a/stdlib/multiprocessing/dummy/connection.pyi b/stdlib/multiprocessing/dummy/connection.pyi index 13688de53aea..2b43fcfd6248 100644 --- a/stdlib/multiprocessing/dummy/connection.pyi +++ b/stdlib/multiprocessing/dummy/connection.pyi @@ -1,7 +1,7 @@ from _typeshed import Self from queue import Queue from types import TracebackType -from typing import Any, Tuple, Type, +from typing import Any, Tuple, Type families: list[None] diff --git a/stdlib/multiprocessing/synchronize.pyi b/stdlib/multiprocessing/synchronize.pyi index 61de45a4216c..685bbd1bcabb 100644 --- a/stdlib/multiprocessing/synchronize.pyi +++ b/stdlib/multiprocessing/synchronize.pyi @@ -2,7 +2,7 @@ import sys import threading from contextlib import AbstractContextManager from multiprocessing.context import BaseContext -from typing import Any, Callable, +from typing import Any, Callable _LockLike = Lock | RLock diff --git a/stdlib/nntplib.pyi b/stdlib/nntplib.pyi index 23cddd033484..3f308e2a2dd7 100644 --- a/stdlib/nntplib.pyi +++ b/stdlib/nntplib.pyi @@ -3,7 +3,7 @@ import socket import ssl import sys from _typeshed import Self -from typing import IO, Any, Iterable, NamedTuple, Tuple, +from typing import IO, Any, Iterable, NamedTuple, Tuple _File = IO[bytes] | bytes | str | None diff --git a/stdlib/pickle.pyi b/stdlib/pickle.pyi index e5212ed485ff..c3859f681881 100644 --- a/stdlib/pickle.pyi +++ b/stdlib/pickle.pyi @@ -1,5 +1,5 @@ import sys -from typing import Any, Callable, ClassVar, Iterable, Iterator, Mapping, Protocol, Tuple, Type, +from typing import Any, Callable, ClassVar, Iterable, Iterator, Mapping, Protocol, Tuple, Type from typing_extensions import final HIGHEST_PROTOCOL: int diff --git a/stdlib/signal.pyi b/stdlib/signal.pyi index 69b518d545d8..e033ee6a911e 100644 --- a/stdlib/signal.pyi +++ b/stdlib/signal.pyi @@ -1,7 +1,7 @@ import sys from enum import IntEnum from types import FrameType -from typing import Any, Callable, Iterable, Tuple, +from typing import Any, Callable, Iterable, Tuple NSIG: int diff --git a/stdlib/socketserver.pyi b/stdlib/socketserver.pyi index 9cfd53f853c3..a3c9c9a25fce 100644 --- a/stdlib/socketserver.pyi +++ b/stdlib/socketserver.pyi @@ -2,7 +2,7 @@ import sys import types from _typeshed import Self from socket import socket as _socket -from typing import Any, BinaryIO, Callable, ClassVar, Tuple, Type, TypeVar, +from typing import Any, BinaryIO, Callable, ClassVar, Tuple, Type, TypeVar _T = TypeVar("_T") _RequestType = _socket | Tuple[bytes, _socket] diff --git a/stdlib/statistics.pyi b/stdlib/statistics.pyi index f1a1f449e491..5a549c75cc2e 100644 --- a/stdlib/statistics.pyi +++ b/stdlib/statistics.pyi @@ -2,7 +2,7 @@ import sys from _typeshed import SupportsRichComparisonT from decimal import Decimal from fractions import Fraction -from typing import Any, Hashable, Iterable, NamedTuple, Sequence, SupportsFloat, Type, TypeVar, +from typing import Any, Hashable, Iterable, NamedTuple, Sequence, SupportsFloat, Type, TypeVar _T = TypeVar("_T") # Most functions in this module accept homogeneous collections of one of these types diff --git a/stdlib/sunau.pyi b/stdlib/sunau.pyi index 81fcd1649a4f..9673ab473421 100644 --- a/stdlib/sunau.pyi +++ b/stdlib/sunau.pyi @@ -1,6 +1,6 @@ import sys from _typeshed import Self -from typing import IO, Any, NamedTuple, NoReturn, +from typing import IO, Any, NamedTuple, NoReturn _File = str | IO[bytes] diff --git a/stdlib/termios.pyi b/stdlib/termios.pyi index 39fecd4c5fe8..d9c7fb8cd697 100644 --- a/stdlib/termios.pyi +++ b/stdlib/termios.pyi @@ -1,5 +1,5 @@ from _typeshed import FileDescriptorLike -from typing import Any, List, +from typing import Any, List _Attr = List[int | List[bytes | int]] diff --git a/stdlib/timeit.pyi b/stdlib/timeit.pyi index 9e3a0f293731..7d85942ddd37 100644 --- a/stdlib/timeit.pyi +++ b/stdlib/timeit.pyi @@ -1,4 +1,4 @@ -from typing import IO, Any, Callable, Sequence, +from typing import IO, Any, Callable, Sequence _Timer = Callable[[], float] _Stmt = str | Callable[[], Any] diff --git a/stdlib/tokenize.pyi b/stdlib/tokenize.pyi index 10ad5dda930e..91e661912908 100644 --- a/stdlib/tokenize.pyi +++ b/stdlib/tokenize.pyi @@ -2,7 +2,7 @@ import sys from _typeshed import StrOrBytesPath from builtins import open as _builtin_open from token import * # noqa: F403 -from typing import Any, Callable, Generator, Iterable, NamedTuple, Pattern, Sequence, TextIO, Tuple, +from typing import Any, Callable, Generator, Iterable, NamedTuple, Pattern, Sequence, TextIO, Tuple if sys.version_info < (3, 7): COMMENT: int diff --git a/stdlib/tty.pyi b/stdlib/tty.pyi index d3c1e7786b5b..c25f22a5a4ff 100644 --- a/stdlib/tty.pyi +++ b/stdlib/tty.pyi @@ -1,4 +1,4 @@ -from typing import IO, +from typing import IO _FD = int | IO[str] diff --git a/stdlib/unittest/result.pyi b/stdlib/unittest/result.pyi index d56e6a42c8c9..427b059f0c7d 100644 --- a/stdlib/unittest/result.pyi +++ b/stdlib/unittest/result.pyi @@ -1,6 +1,6 @@ import unittest.case from types import TracebackType -from typing import Any, Callable, TextIO, Tuple, Type, TypeVar, +from typing import Any, Callable, TextIO, Tuple, Type, TypeVar _SysExcInfoType = Tuple[Type[BaseException], BaseException, TracebackType] | Tuple[None, None, None] diff --git a/stdlib/unittest/suite.pyi b/stdlib/unittest/suite.pyi index 7dd16b54cbc0..3d7f87c9b20f 100644 --- a/stdlib/unittest/suite.pyi +++ b/stdlib/unittest/suite.pyi @@ -1,6 +1,6 @@ import unittest.case import unittest.result -from typing import Iterable, Iterator, +from typing import Iterable, Iterator _TestType = unittest.case.TestCase | TestSuite diff --git a/stdlib/uu.pyi b/stdlib/uu.pyi index 207c27356aa1..3687a843d39d 100644 --- a/stdlib/uu.pyi +++ b/stdlib/uu.pyi @@ -1,5 +1,5 @@ import sys -from typing import BinaryIO, +from typing import BinaryIO _File = str | BinaryIO diff --git a/stdlib/wave.pyi b/stdlib/wave.pyi index e650b73eaf83..aef20986572a 100644 --- a/stdlib/wave.pyi +++ b/stdlib/wave.pyi @@ -1,6 +1,6 @@ import sys from _typeshed import Self -from typing import IO, Any, BinaryIO, NamedTuple, NoReturn, +from typing import IO, Any, BinaryIO, NamedTuple, NoReturn _File = str | IO[bytes] diff --git a/stdlib/winreg.pyi b/stdlib/winreg.pyi index e724a6cbf315..13f784111554 100644 --- a/stdlib/winreg.pyi +++ b/stdlib/winreg.pyi @@ -1,6 +1,6 @@ from _typeshed import Self from types import TracebackType -from typing import Any, Type, +from typing import Any, Type from typing_extensions import final _KeyType = HKEYType | int diff --git a/stdlib/xml/dom/pulldom.pyi b/stdlib/xml/dom/pulldom.pyi index b465736dfb70..72399ff261b0 100644 --- a/stdlib/xml/dom/pulldom.pyi +++ b/stdlib/xml/dom/pulldom.pyi @@ -1,5 +1,5 @@ import sys -from typing import IO, Any, Sequence, Tuple, +from typing import IO, Any, Sequence, Tuple from typing_extensions import Literal from xml.dom.minidom import Document, DOMImplementation, Element, Text from xml.sax.handler import ContentHandler diff --git a/stdlib/xml/dom/xmlbuilder.pyi b/stdlib/xml/dom/xmlbuilder.pyi index 93c2eb1d56ee..5792842eaf9d 100644 --- a/stdlib/xml/dom/xmlbuilder.pyi +++ b/stdlib/xml/dom/xmlbuilder.pyi @@ -1,4 +1,4 @@ -from typing import Any, NoReturn, +from typing import Any, NoReturn from typing_extensions import Literal from urllib.request import OpenerDirector from xml.dom.expatbuilder import ExpatBuilder, ExpatBuilderNS diff --git a/stdlib/xmlrpc/server.pyi b/stdlib/xmlrpc/server.pyi index 182f66ca150a..9b16196d887f 100644 --- a/stdlib/xmlrpc/server.pyi +++ b/stdlib/xmlrpc/server.pyi @@ -3,7 +3,7 @@ import pydoc import socketserver import sys from datetime import datetime -from typing import Any, Callable, Dict, Iterable, List, Mapping, Pattern, Protocol, Tuple, Type, +from typing import Any, Callable, Dict, Iterable, List, Mapping, Pattern, Protocol, Tuple, Type from xmlrpc.client import Fault # TODO: Recursive type on tuple, list, dict diff --git a/stdlib/zipapp.pyi b/stdlib/zipapp.pyi index 377e7b36f4ba..4ed6cf5d0a0a 100644 --- a/stdlib/zipapp.pyi +++ b/stdlib/zipapp.pyi @@ -1,6 +1,6 @@ import sys from pathlib import Path -from typing import BinaryIO, Callable, +from typing import BinaryIO, Callable _Path = str | Path | BinaryIO diff --git a/stubs/Pillow/PIL/Image.pyi b/stubs/Pillow/PIL/Image.pyi index c2d9bca3436f..ed750b4fba9b 100644 --- a/stubs/Pillow/PIL/Image.pyi +++ b/stubs/Pillow/PIL/Image.pyi @@ -1,7 +1,7 @@ from _typeshed import SupportsRead, SupportsWrite from collections.abc import Iterable, Iterator, MutableMapping from pathlib import Path -from typing import Any, Callable, Dict, Protocol, Sequence, SupportsBytes, Tuple, +from typing import Any, Callable, Dict, Protocol, Sequence, SupportsBytes, Tuple from typing_extensions import Literal from ._imaging import ( diff --git a/stubs/Pillow/PIL/ImageColor.pyi b/stubs/Pillow/PIL/ImageColor.pyi index 28ae51d81061..59a5dc8505d8 100644 --- a/stubs/Pillow/PIL/ImageColor.pyi +++ b/stubs/Pillow/PIL/ImageColor.pyi @@ -1,4 +1,4 @@ -from typing import Tuple, +from typing import Tuple _RGB = Tuple[int, int, int] | Tuple[int, int, int, int] _Ink = str | int | _RGB diff --git a/stubs/Pillow/PIL/TiffTags.pyi b/stubs/Pillow/PIL/TiffTags.pyi index f0a8c2b4753d..57ef38add890 100644 --- a/stubs/Pillow/PIL/TiffTags.pyi +++ b/stubs/Pillow/PIL/TiffTags.pyi @@ -1,4 +1,4 @@ -from typing import Any, Dict, NamedTuple, Tuple, +from typing import Any, Dict, NamedTuple, Tuple from typing_extensions import Literal class _TagInfo(NamedTuple): diff --git a/stubs/PyYAML/yaml/constructor.pyi b/stubs/PyYAML/yaml/constructor.pyi index e0f029c216a8..c030cd23a2bb 100644 --- a/stubs/PyYAML/yaml/constructor.pyi +++ b/stubs/PyYAML/yaml/constructor.pyi @@ -1,4 +1,4 @@ -from typing import Any, Pattern, +from typing import Any, Pattern from yaml.error import MarkedYAMLError from yaml.nodes import ScalarNode diff --git a/stubs/PyYAML/yaml/cyaml.pyi b/stubs/PyYAML/yaml/cyaml.pyi index 536a6a5cb393..74946311ec94 100644 --- a/stubs/PyYAML/yaml/cyaml.pyi +++ b/stubs/PyYAML/yaml/cyaml.pyi @@ -1,6 +1,6 @@ from _typeshed import SupportsRead from collections.abc import Mapping, Sequence -from typing import IO, Any, +from typing import IO, Any from ._yaml import CEmitter, CParser from .constructor import BaseConstructor, FullConstructor, SafeConstructor, UnsafeConstructor diff --git a/stubs/Pygments/pygments/lexers/__init__.pyi b/stubs/Pygments/pygments/lexers/__init__.pyi index f4fa127a0853..7f53a1b9ff79 100644 --- a/stubs/Pygments/pygments/lexers/__init__.pyi +++ b/stubs/Pygments/pygments/lexers/__init__.pyi @@ -1,6 +1,6 @@ from _typeshed import StrOrBytesPath, StrPath from collections.abc import Iterator -from typing import Any, Tuple, +from typing import Any, Tuple from pygments.lexer import Lexer, LexerMeta diff --git a/stubs/bleach/bleach/sanitizer.pyi b/stubs/bleach/bleach/sanitizer.pyi index 06a752a59e69..c6b5d1be7ad7 100644 --- a/stubs/bleach/bleach/sanitizer.pyi +++ b/stubs/bleach/bleach/sanitizer.pyi @@ -1,5 +1,5 @@ from collections.abc import Callable, Container, Iterable -from typing import Any, Dict, List, Pattern, +from typing import Any, Dict, List, Pattern from .html5lib_shim import BleachHTMLParser, BleachHTMLSerializer, SanitizerFilter diff --git a/stubs/colorama/colorama/ansitowin32.pyi b/stubs/colorama/colorama/ansitowin32.pyi index 20c7edc49df6..606e0f0acf9a 100644 --- a/stubs/colorama/colorama/ansitowin32.pyi +++ b/stubs/colorama/colorama/ansitowin32.pyi @@ -1,6 +1,6 @@ import sys from _typeshed import SupportsWrite -from typing import Any, Callable, Dict, Pattern, Sequence, TextIO, Tuple, +from typing import Any, Callable, Dict, Pattern, Sequence, TextIO, Tuple if sys.platform == "win32": from .winterm import WinTerm diff --git a/stubs/croniter/croniter.pyi b/stubs/croniter/croniter.pyi index 1c6520d8e180..68d0969f9123 100644 --- a/stubs/croniter/croniter.pyi +++ b/stubs/croniter/croniter.pyi @@ -1,5 +1,5 @@ import datetime -from typing import Any, Iterator, Text, Tuple, Type, TypeVar, +from typing import Any, Iterator, Text, Tuple, Type, TypeVar from typing_extensions import Literal _RetType = Type[float] | Type[datetime.datetime] diff --git a/stubs/docopt/docopt.pyi b/stubs/docopt/docopt.pyi index 44139cff44b5..d3774d4c558c 100644 --- a/stubs/docopt/docopt.pyi +++ b/stubs/docopt/docopt.pyi @@ -1,4 +1,4 @@ -from typing import Any, Iterable, +from typing import Any, Iterable __version__: str diff --git a/stubs/paramiko/paramiko/common.pyi b/stubs/paramiko/paramiko/common.pyi index 7dba37326b82..e5e6da5a99c4 100644 --- a/stubs/paramiko/paramiko/common.pyi +++ b/stubs/paramiko/paramiko/common.pyi @@ -1,5 +1,5 @@ import sys -from typing import Protocol, Text, +from typing import Protocol, Text MSG_DISCONNECT: int MSG_IGNORE: int diff --git a/stubs/pyOpenSSL/OpenSSL/crypto.pyi b/stubs/pyOpenSSL/OpenSSL/crypto.pyi index 293423393b17..adad55c91c68 100644 --- a/stubs/pyOpenSSL/OpenSSL/crypto.pyi +++ b/stubs/pyOpenSSL/OpenSSL/crypto.pyi @@ -1,5 +1,5 @@ from datetime import datetime -from typing import Any, Callable, Iterable, Sequence, Text, Tuple, +from typing import Any, Callable, Iterable, Sequence, Text, Tuple from cryptography.hazmat.primitives.asymmetric.dsa import DSAPrivateKey, DSAPublicKey from cryptography.hazmat.primitives.asymmetric.rsa import RSAPrivateKey, RSAPublicKey diff --git a/stubs/pyaudio/pyaudio.pyi b/stubs/pyaudio/pyaudio.pyi index dbdbd76143f7..0c77e07d388b 100644 --- a/stubs/pyaudio/pyaudio.pyi +++ b/stubs/pyaudio/pyaudio.pyi @@ -1,4 +1,4 @@ -from typing import Callable, Mapping, Sequence, Tuple, +from typing import Callable, Mapping, Sequence, Tuple from typing_extensions import Final paFloat32: Final[int] = ... diff --git a/stubs/pysftp/pysftp/__init__.pyi b/stubs/pysftp/pysftp/__init__.pyi index c11477bdbbee..16cab1a30ddf 100644 --- a/stubs/pysftp/pysftp/__init__.pyi +++ b/stubs/pysftp/pysftp/__init__.pyi @@ -1,6 +1,6 @@ from stat import S_IMODE as S_IMODE from types import TracebackType -from typing import IO, Any, Callable, ContextManager, Sequence, Text, Type, +from typing import IO, Any, Callable, ContextManager, Sequence, Text, Type from typing_extensions import Literal import paramiko diff --git a/stubs/python-dateutil/dateutil/parser/__init__.pyi b/stubs/python-dateutil/dateutil/parser/__init__.pyi index ae6d93b59410..a3c5282a3ebc 100644 --- a/stubs/python-dateutil/dateutil/parser/__init__.pyi +++ b/stubs/python-dateutil/dateutil/parser/__init__.pyi @@ -1,5 +1,5 @@ from datetime import datetime, tzinfo -from typing import IO, Any, Mapping, Text, +from typing import IO, Any, Mapping, Text from .isoparser import isoparse as isoparse, isoparser as isoparser diff --git a/stubs/python-dateutil/dateutil/parser/isoparser.pyi b/stubs/python-dateutil/dateutil/parser/isoparser.pyi index 636a5577759f..69d983ae71fb 100644 --- a/stubs/python-dateutil/dateutil/parser/isoparser.pyi +++ b/stubs/python-dateutil/dateutil/parser/isoparser.pyi @@ -1,6 +1,6 @@ from _typeshed import SupportsRead from datetime import date, datetime, time, tzinfo -from typing import Text, +from typing import Text _Readable = SupportsRead[Text | bytes] _TakesAscii = Text | bytes | _Readable diff --git a/stubs/python-dateutil/dateutil/tz/tz.pyi b/stubs/python-dateutil/dateutil/tz/tz.pyi index 53e0fa7e8fdd..296d4418e128 100644 --- a/stubs/python-dateutil/dateutil/tz/tz.pyi +++ b/stubs/python-dateutil/dateutil/tz/tz.pyi @@ -1,5 +1,5 @@ import datetime -from typing import IO, Any, Text, TypeVar, +from typing import IO, Any, Text, TypeVar from ..relativedelta import relativedelta from ._common import _tzinfo as _tzinfo, enfold as enfold, tzname_in_python2 as tzname_in_python2, tzrangebase as tzrangebase diff --git a/stubs/requests/requests/sessions.pyi b/stubs/requests/requests/sessions.pyi index a12cc60284bb..0c7a788b4e60 100644 --- a/stubs/requests/requests/sessions.pyi +++ b/stubs/requests/requests/sessions.pyi @@ -1,5 +1,5 @@ from _typeshed import SupportsItems -from typing import IO, Any, Callable, Iterable, List, Mapping, MutableMapping, Text, Tuple, TypeVar, +from typing import IO, Any, Callable, Iterable, List, Mapping, MutableMapping, Text, Tuple, TypeVar from . import adapters, auth as _auth, compat, cookies, exceptions, hooks, models, status_codes, structures, utils from .models import Response diff --git a/stubs/simplejson/simplejson/__init__.pyi b/stubs/simplejson/simplejson/__init__.pyi index 13ec9e3f2513..9e3401e78bb1 100644 --- a/stubs/simplejson/simplejson/__init__.pyi +++ b/stubs/simplejson/simplejson/__init__.pyi @@ -1,4 +1,4 @@ -from typing import IO, Any, Text, +from typing import IO, Any, Text from simplejson.decoder import JSONDecoder as JSONDecoder from simplejson.encoder import JSONEncoder as JSONEncoder, JSONEncoderForHTML as JSONEncoderForHTML diff --git a/stubs/tabulate/tabulate.pyi b/stubs/tabulate/tabulate.pyi index ae1b94b3f2c0..16dc3a28c80c 100644 --- a/stubs/tabulate/tabulate.pyi +++ b/stubs/tabulate/tabulate.pyi @@ -1,4 +1,4 @@ -from typing import Any, Callable, Container, Iterable, List, Mapping, NamedTuple, Sequence, +from typing import Any, Callable, Container, Iterable, List, Mapping, NamedTuple, Sequence LATEX_ESCAPE_RULES: dict[str, str] MIN_PADDING: int diff --git a/stubs/toml/toml.pyi b/stubs/toml/toml.pyi index 96786ac96c86..2bb7d57a07aa 100644 --- a/stubs/toml/toml.pyi +++ b/stubs/toml/toml.pyi @@ -1,6 +1,6 @@ import sys from _typeshed import StrPath, SupportsWrite -from typing import IO, Any, Mapping, MutableMapping, Text, Type, +from typing import IO, Any, Mapping, MutableMapping, Text, Type if sys.version_info >= (3, 6): _PathLike = StrPath