Skip to content

Commit 798ab7e

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
1 parent 885094b commit 798ab7e

File tree

141 files changed

+155
-206
lines changed

Some content is hidden

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

141 files changed

+155
-206
lines changed

stdlib/_codecs.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import codecs
22
import sys
3-
from typing import Any, Callable, Dict, Tuple,
3+
from typing import Any, Callable, Dict, Tuple
44

55
# This type is not exposed; it is defined in unicodeobject.c
66
class _EncodingMap:

stdlib/_csv.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any, Iterable, Iterator, List, Protocol, Type,
1+
from typing import Any, Iterable, Iterator, List, Protocol, Type
22

33
QUOTE_ALL: int
44
QUOTE_MINIMAL: int

stdlib/_curses.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import sys
2-
from typing import IO, Any, BinaryIO, NamedTuple, overload
2+
from typing import IO, Any, BinaryIO, NamedTuple, overload
33

44
_chtype = str | bytes | int
55

stdlib/_dummy_threading.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import sys
22
from types import FrameType, TracebackType
3-
from typing import Any, Callable, Iterable, Mapping, Type, TypeVar
3+
from typing import Any, Callable, Iterable, Mapping, Type, TypeVar
44

55
# TODO recursive type
66
_TF = Callable[[FrameType, str, Any], Callable[..., Any] | None]

stdlib/_socket.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import sys
22
from _typeshed import ReadableBuffer, WriteableBuffer
33
from collections.abc import Iterable
4-
from typing import Any, SupportsInt, Tuple, overload
4+
from typing import Any, SupportsInt, Tuple, overload
55

66
if sys.version_info >= (3, 8):
77
from typing import SupportsIndex

stdlib/_thread.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import sys
22
from threading import Thread
33
from types import TracebackType
4-
from typing import Any, Callable, NoReturn, Tuple, Type
4+
from typing import Any, Callable, NoReturn, Tuple, Type
55
from typing_extensions import final
66

77
error = RuntimeError

stdlib/_typeshed/__init__.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import ctypes
77
import mmap
88
import sys
99
from os import PathLike
10-
from typing import AbstractSet, Any, Awaitable, Container, Iterable, Protocol, TypeVar,
10+
from typing import AbstractSet, Any, Awaitable, Container, Iterable, Protocol, TypeVar
1111
from typing_extensions import Literal, final
1212

1313
_KT = TypeVar("_KT")

stdlib/aifc.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import sys
22
from _typeshed import Self
33
from types import TracebackType
4-
from typing import IO, Any, NamedTuple, Tuple, Type, overload
4+
from typing import IO, Any, NamedTuple, Tuple, Type, overload
55
from typing_extensions import Literal
66

77
class Error(Exception): ...

stdlib/array.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import sys
2-
from typing import Any, BinaryIO, Generic, Iterable, MutableSequence, TypeVar, overload
2+
from typing import Any, BinaryIO, Generic, Iterable, MutableSequence, TypeVar, overload
33
from typing_extensions import Literal, SupportsIndex
44

55
_IntTypeCode = Literal["b", "B", "h", "H", "i", "I", "l", "L", "q", "Q"]

stdlib/asyncio/base_events.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ from asyncio.tasks import Task
99
from asyncio.transports import BaseTransport
1010
from collections.abc import Iterable
1111
from socket import AddressFamily, SocketKind, _Address, _RetAddress, socket
12-
from typing import IO, Any, Awaitable, Callable, Dict, Generator, Sequence, Tuple, TypeVar, overload
12+
from typing import IO, Any, Awaitable, Callable, Dict, Generator, Sequence, Tuple, TypeVar, overload
1313
from typing_extensions import Literal
1414

1515
if sys.version_info >= (3, 7):

stdlib/asyncio/base_subprocess.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import subprocess
22
from collections import deque
3-
from typing import IO, Any, Callable, Sequence, Tuple,
3+
from typing import IO, Any, Callable, Sequence, Tuple
44

55
from . import events, futures, protocols, transports
66

stdlib/asyncio/events.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import sys
33
from _typeshed import FileDescriptorLike, Self
44
from abc import ABCMeta, abstractmethod
55
from socket import AddressFamily, SocketKind, _Address, _RetAddress, socket
6-
from typing import IO, Any, Awaitable, Callable, Dict, Generator, Sequence, Tuple, TypeVar, overload
6+
from typing import IO, Any, Awaitable, Callable, Dict, Generator, Sequence, Tuple, TypeVar, overload
77
from typing_extensions import Literal
88

99
from .base_events import Server

stdlib/asyncio/format_helpers.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import functools
22
import sys
33
import traceback
44
from types import FrameType, FunctionType
5-
from typing import Any, Iterable, overload
5+
from typing import Any, Iterable, overload
66

77
class _HasWrapper:
88
__wrapper__: _HasWrapper | FunctionType

stdlib/asyncio/streams.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import sys
22
from _typeshed import StrPath
3-
from typing import Any, AsyncIterator, Awaitable, Callable, Iterable,
3+
from typing import Any, AsyncIterator, Awaitable, Callable, Iterable
44

55
from . import events, protocols, transports
66
from .base_events import Server

stdlib/asyncio/subprocess.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import subprocess
22
import sys
33
from _typeshed import StrOrBytesPath
44
from asyncio import events, protocols, streams, transports
5-
from typing import IO, Any, Callable,
5+
from typing import IO, Any, Callable
66
from typing_extensions import Literal
77

88
if sys.version_info >= (3, 8):

stdlib/asyncio/tasks.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import concurrent.futures
22
import sys
33
from collections.abc import Awaitable, Generator, Iterable, Iterator
44
from types import FrameType
5-
from typing import Any, Generic, TextIO, TypeVar, overload
5+
from typing import Any, Generic, TextIO, TypeVar, overload
66
from typing_extensions import Literal
77

88
from .events import AbstractEventLoop

stdlib/asyncio/trsock.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import socket
22
import sys
33
from types import TracebackType
4-
from typing import Any, BinaryIO, Iterable, NoReturn, Tuple, Type, overload
4+
from typing import Any, BinaryIO, Iterable, NoReturn, Tuple, Type, overload
55

66
if sys.version_info >= (3, 8):
77
# These are based in socket, maybe move them out into _typeshed.pyi or such

stdlib/binhex.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import IO, Any, Tuple,
1+
from typing import IO, Any, Tuple
22

33
class Error(Exception): ...
44

stdlib/builtins.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ from typing import (
5454
Tuple,
5555
Type,
5656
TypeVar,
57-
5857
overload,
5958
)
6059
from typing_extensions import Literal, SupportsIndex, TypeGuard, final

stdlib/calendar.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import datetime
22
import sys
33
from time import struct_time
4-
from typing import Any, Iterable, Sequence, Tuple
4+
from typing import Any, Iterable, Sequence, Tuple
55

66
_LocaleType = Tuple[str | None, str | None]
77

stdlib/cgitb.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from _typeshed import StrOrBytesPath
22
from types import FrameType, TracebackType
3-
from typing import IO, Any, Callable, Tuple, Type
3+
from typing import IO, Any, Callable, Tuple, Type
44

55
_ExcInfo = Tuple[Type[BaseException] | None, BaseException | None, TracebackType | None]
66

stdlib/cmath.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import sys
2-
from typing import SupportsComplex, SupportsFloat,
2+
from typing import SupportsComplex, SupportsFloat
33

44
if sys.version_info >= (3, 8):
55
from typing import SupportsIndex

stdlib/configparser.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import sys
22
from _typeshed import StrOrBytesPath, StrPath, SupportsWrite
33
from collections.abc import Callable, ItemsView, Iterable, Iterator, Mapping, MutableMapping, Sequence
4-
from typing import Any, ClassVar, Dict, Pattern, Type, TypeVar, overload
4+
from typing import Any, ClassVar, Dict, Pattern, Type, TypeVar, overload
55
from typing_extensions import Literal
66

77
# Internal type aliases

stdlib/contextlib.pyi

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,7 @@
11
import sys
22
from _typeshed import Self, StrOrBytesPath
33
from types import TracebackType
4-
from typing import (
5-
IO,
6-
Any,
7-
AsyncIterator,
8-
Awaitable,
9-
Callable,
10-
ContextManager,
11-
Generic,
12-
Iterator,
13-
14-
Type,
15-
TypeVar,
16-
overload,
17-
)
4+
from typing import IO, Any, AsyncIterator, Awaitable, Callable, ContextManager, Generic, Iterator, Type, TypeVar, overload
185
from typing_extensions import ParamSpec, Protocol
196

207
AbstractContextManager = ContextManager

stdlib/copyreg.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any, Callable, Hashable, SupportsInt, Tuple, TypeVar,
1+
from typing import Any, Callable, Hashable, SupportsInt, Tuple, TypeVar
22

33
_TypeT = TypeVar("_TypeT", bound=type)
44
_Reduce = Tuple[Callable[..., _TypeT], Tuple[Any, ...]] | Tuple[Callable[..., _TypeT], Tuple[Any, ...], Any | None]

stdlib/ctypes/__init__.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ from typing import (
99
Iterable,
1010
Iterator,
1111
Mapping,
12-
1312
Sequence,
1413
Tuple,
1514
Type,

stdlib/dbm/__init__.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from _typeshed import Self
22
from types import TracebackType
3-
from typing import Iterator, MutableMapping, Type,
3+
from typing import Iterator, MutableMapping, Type
44
from typing_extensions import Literal
55

66
_KeyType = str | bytes

stdlib/dbm/dumb.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from _typeshed import Self
22
from types import TracebackType
3-
from typing import Iterator, MutableMapping, Type,
3+
from typing import Iterator, MutableMapping, Type
44

55
_KeyType = str | bytes
66
_ValueType = str | bytes

stdlib/dbm/gnu.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from _typeshed import Self
22
from types import TracebackType
3-
from typing import Type, TypeVar, overload
3+
from typing import Type, TypeVar, overload
44

55
_T = TypeVar("_T")
66
_KeyType = str | bytes

stdlib/dbm/ndbm.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from _typeshed import Self
22
from types import TracebackType
3-
from typing import Type, TypeVar, overload
3+
from typing import Type, TypeVar, overload
44

55
_T = TypeVar("_T")
66
_KeyType = str | bytes

stdlib/decimal.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import numbers
22
from types import TracebackType
3-
from typing import Any, Container, NamedTuple, Sequence, Tuple, Type, TypeVar, overload
3+
from typing import Any, Container, NamedTuple, Sequence, Tuple, Type, TypeVar, overload
44

55
_Decimal = Decimal | int
66
_DecimalNew = Decimal | float | str | Tuple[int, Sequence[int], int]

stdlib/difflib.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import sys
2-
from typing import Any, AnyStr, Callable, Generic, Iterable, Iterator, NamedTuple, Sequence, TypeVar, overload
2+
from typing import Any, AnyStr, Callable, Generic, Iterable, Iterator, NamedTuple, Sequence, TypeVar, overload
33

44
if sys.version_info >= (3, 9):
55
from types import GenericAlias

stdlib/dis.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ from opcode import (
1616
opname as opname,
1717
stack_effect as stack_effect,
1818
)
19-
from typing import IO, Any, Callable, Iterator, NamedTuple,
19+
from typing import IO, Any, Callable, Iterator, NamedTuple
2020

2121
# Strictly this should not have to include Callable, but mypy doesn't use FunctionType
2222
# for functions (python/mypy#3171)

stdlib/distutils/ccompiler.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any, Callable, Tuple,
1+
from typing import Any, Callable, Tuple
22

33
_Macro = Tuple[str] | Tuple[str, str | None]
44

stdlib/distutils/fancy_getopt.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any, Iterable, List, Mapping, Tuple, overload
1+
from typing import Any, Iterable, List, Mapping, Tuple, overload
22

33
_Option = Tuple[str, str | None, str]
44
_GR = Tuple[List[str], OptionDummy]

stdlib/email/_header_value_parser.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import sys
22
from email.errors import HeaderParseError, MessageDefect
33
from email.policy import Policy
4-
from typing import Any, Iterable, Iterator, List, Pattern, Type, TypeVar,
4+
from typing import Any, Iterable, Iterator, List, Pattern, Type, TypeVar
55
from typing_extensions import Final
66

77
_T = TypeVar("_T")

stdlib/email/message.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ from email.charset import Charset
22
from email.contentmanager import ContentManager
33
from email.errors import MessageDefect
44
from email.policy import Policy
5-
from typing import Any, Generator, Iterator, List, Sequence, Tuple, TypeVar,
5+
from typing import Any, Generator, Iterator, List, Sequence, Tuple, TypeVar
66

77
_T = TypeVar("_T")
88

stdlib/email/mime/application.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from email.mime.nonmultipart import MIMENonMultipart
22
from email.policy import Policy
3-
from typing import Callable, Tuple,
3+
from typing import Callable, Tuple
44

55
_ParamsType = str | None | Tuple[str, str | None, str]
66

stdlib/email/mime/audio.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from email.mime.nonmultipart import MIMENonMultipart
22
from email.policy import Policy
3-
from typing import Callable, Tuple,
3+
from typing import Callable, Tuple
44

55
_ParamsType = str | None | Tuple[str, str | None, str]
66

stdlib/email/mime/base.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import email.message
22
from email.policy import Policy
3-
from typing import Tuple,
3+
from typing import Tuple
44

55
_ParamsType = str | None | Tuple[str, str | None, str]
66

stdlib/email/mime/image.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from email.mime.nonmultipart import MIMENonMultipart
22
from email.policy import Policy
3-
from typing import Callable, Tuple,
3+
from typing import Callable, Tuple
44

55
_ParamsType = str | None | Tuple[str, str | None, str]
66

stdlib/email/mime/multipart.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from email.message import Message
22
from email.mime.base import MIMEBase
33
from email.policy import Policy
4-
from typing import Sequence, Tuple,
4+
from typing import Sequence, Tuple
55

66
_ParamsType = str | None | Tuple[str, str | None, str]
77

stdlib/email/utils.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import datetime
22
import sys
33
from email.charset import Charset
4-
from typing import Tuple, overload
4+
from typing import Tuple, overload
55

66
_ParamType = str | Tuple[str | None, str | None, str]
77
_PDTZ = Tuple[int, int, int, int, int, int, int, int, int, int | None]

stdlib/enum.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import types
33
from abc import ABCMeta
44
from builtins import property as _builtins_property
55
from collections.abc import Iterable, Iterator, Mapping
6-
from typing import Any, Dict, Tuple, Type, TypeVar, overload
6+
from typing import Any, Dict, Tuple, Type, TypeVar, overload
77

88
_T = TypeVar("_T")
99
_S = TypeVar("_S", bound=Type[Enum])

stdlib/fractions.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import sys
22
from decimal import Decimal
33
from numbers import Integral, Rational, Real
4-
from typing import Type, TypeVar, overload
4+
from typing import Type, TypeVar, overload
55
from typing_extensions import Literal
66

77
_ComparableNum = int | float | Decimal | Real

stdlib/hmac.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import sys
22
from _typeshed import ReadableBuffer
33
from types import ModuleType
4-
from typing import Any, AnyStr, Callable, overload
4+
from typing import Any, AnyStr, Callable, overload
55

66
# TODO more precise type for object of hashlib
77
_Hash = Any

stdlib/http/client.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import sys
55
import types
66
from _typeshed import Self, WriteableBuffer
77
from socket import socket
8-
from typing import IO, Any, BinaryIO, Callable, Iterable, Iterator, Mapping, Protocol, Type, TypeVar, overload
8+
from typing import IO, Any, BinaryIO, Callable, Iterable, Iterator, Mapping, Protocol, Type, TypeVar, overload
99

1010
_DataType = bytes | IO[Any] | Iterable[bytes] | str
1111
_T = TypeVar("_T")

0 commit comments

Comments
 (0)