Skip to content

Commit 0bfbaf6

Browse files
committed
Change List to list
1 parent 64903b8 commit 0bfbaf6

File tree

14 files changed

+32
-32
lines changed

14 files changed

+32
-32
lines changed

stdlib/distutils/fancy_getopt.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
from typing import Any, Iterable, List, Mapping, Optional, Tuple, overload
1+
from typing import Any, Iterable, Mapping, Optional, Tuple, overload
22

33
_Option = Tuple[str, Optional[str], str]
4-
_GR = Tuple[List[str], OptionDummy]
4+
_GR = Tuple[list[str], OptionDummy]
55

66
def fancy_getopt(
77
options: list[_Option], negative_opt: Mapping[_Option, _Option], object: Any, args: list[str] | None

stdlib/email/_header_value_parser.pyi

Lines changed: 2 additions & 2 deletions
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, Set, Tuple, Type, TypeVar, Union
4+
from typing import Any, Iterable, Iterator, Pattern, Set, Tuple, Type, TypeVar, Union
55
from typing_extensions import Final
66

77
_T = TypeVar("_T")
@@ -23,7 +23,7 @@ def quote_string(value: Any) -> str: ...
2323
if sys.version_info >= (3, 7):
2424
rfc2047_matcher: Pattern[str]
2525

26-
class TokenList(List[Union[TokenList, Terminal]]):
26+
class TokenList(list[Union[TokenList, Terminal]]):
2727
token_type: str | None = ...
2828
syntactic_break: bool = ...
2929
ew_combine_allowed: bool = ...

stdlib/email/message.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ 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, Optional, Sequence, Tuple, TypeVar, Union
5+
from typing import Any, Generator, Iterator, Optional, Sequence, Tuple, TypeVar, Union
66

77
_T = TypeVar("_T")
88

9-
_PayloadType = Union[List[Message], str, bytes]
9+
_PayloadType = Union[list[Message], str, bytes]
1010
_CharsetType = Union[Charset, str, None]
1111
_ParamsType = Union[str, None, Tuple[str, Optional[str], str]]
1212
_ParamType = Union[str, Tuple[Optional[str], Optional[str], str]]

stdlib/lib2to3/pgen2/grammar.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from _typeshed import StrPath
2-
from typing import Dict, List, Optional, Tuple, TypeVar
2+
from typing import Dict, Optional, Tuple, TypeVar
33

44
_P = TypeVar("_P")
55
_Label = Tuple[int, Optional[str]]
6-
_DFA = List[List[Tuple[int, int]]]
6+
_DFA = list[list[Tuple[int, int]]]
77
_DFAS = Tuple[_DFA, Dict[int, int]]
88

99
class Grammar:

stdlib/lib2to3/pytree.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
from lib2to3.pgen2.grammar import Grammar
2-
from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, TypeVar, Union
2+
from typing import Any, Callable, Dict, Iterator, Optional, Tuple, TypeVar, Union
33

44
_P = TypeVar("_P")
55
_NL = Union[Node, Leaf]
66
_Context = Tuple[str, int, int]
77
_Results = Dict[str, _NL]
8-
_RawNode = Tuple[int, str, _Context, Optional[List[_NL]]]
8+
_RawNode = Tuple[int, str, _Context, Optional[list[_NL]]]
99
_Convert = Callable[[Grammar, _RawNode], Any]
1010

1111
HUGE: int

stdlib/msilib/sequence.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import sys
2-
from typing import List, Optional, Tuple
2+
from typing import Optional, Tuple
33

44
if sys.platform == "win32":
55

6-
_SequenceType = List[Tuple[str, Optional[str], int]]
6+
_SequenceType = list[Tuple[str, Optional[str], int]]
77

88
AdminExecuteSequence: _SequenceType
99
AdminUISequence: _SequenceType

stdlib/multiprocessing/managers.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import queue
44
import sys
55
import threading
6-
from typing import Any, AnyStr, Callable, ContextManager, Dict, Generic, Iterable, List, Mapping, Sequence, Tuple, TypeVar
6+
from typing import Any, AnyStr, Callable, ContextManager, Dict, Generic, Iterable, Mapping, Sequence, Tuple, TypeVar
77

88
from .connection import Connection
99
from .context import BaseContext
@@ -105,7 +105,7 @@ class SyncManager(BaseManager, ContextManager[SyncManager]):
105105
def Array(self, typecode: Any, sequence: Sequence[_T]) -> Sequence[_T]: ...
106106
def Value(self, typecode: Any, value: _T) -> ValueProxy[_T]: ...
107107
def dict(self, sequence: Mapping[_KT, _VT] = ...) -> Dict[_KT, _VT]: ...
108-
def list(self, sequence: Sequence[_T] = ...) -> List[_T]: ...
108+
def list(self, sequence: Sequence[_T] = ...) -> list[_T]: ...
109109

110110
class RemoteError(Exception): ...
111111

stdlib/multiprocessing/pool.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import sys
22
from _typeshed import Self
3-
from typing import Any, Callable, ContextManager, Generic, Iterable, Iterator, List, Mapping, TypeVar
3+
from typing import Any, Callable, ContextManager, Generic, Iterable, Iterator, Mapping, TypeVar
44

55
if sys.version_info >= (3, 9):
66
from types import GenericAlias
@@ -26,7 +26,7 @@ class ApplyResult(Generic[_T]):
2626
# alias created during issue #17805
2727
AsyncResult = ApplyResult
2828

29-
class MapResult(ApplyResult[List[_T]]): ...
29+
class MapResult(ApplyResult[list[_T]]): ...
3030

3131
class IMapIterator(Iterator[_T]):
3232
def __iter__(self: _S) -> _S: ...

stdlib/tkinter/__init__.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ from enum import Enum
55
from tkinter.constants import * # comment this out to find undefined identifier names with flake8
66
from tkinter.font import _FontDescription
77
from types import TracebackType
8-
from typing import Any, Callable, Generic, List, Mapping, Optional, Protocol, Sequence, Tuple, Type, TypeVar, Union, overload
8+
from typing import Any, Callable, Generic, Mapping, Optional, Protocol, Sequence, Tuple, Type, TypeVar, Union, overload
99
from typing_extensions import Literal, TypedDict
1010

1111
# Using anything from tkinter.font in this file means that 'import tkinter'
@@ -82,8 +82,8 @@ EXCEPTION = _tkinter.EXCEPTION
8282
# ...
8383
# _tkinter.TclError: unknown font style "deque(['bold'])"
8484
_T = TypeVar("_T")
85-
_TkinterSequence = Union[List[_T], Tuple[_T, ...]]
86-
_TkinterSequence2D = Union[List[List[_T]], List[Tuple[_T, ...]], Tuple[List[_T], ...], Tuple[Tuple[_T, ...], ...]]
85+
_TkinterSequence = Union[list[_T], Tuple[_T, ...]]
86+
_TkinterSequence2D = Union[list[list[_T]], list[Tuple[_T, ...]], Tuple[list[_T], ...], Tuple[Tuple[_T, ...], ...]]
8787

8888
# Some widgets have an option named -compound that accepts different values
8989
# than the _Compound defined here. Many other options have similar things.

stdlib/unittest/loader.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import unittest.case
33
import unittest.result
44
import unittest.suite
55
from types import ModuleType
6-
from typing import Any, Callable, List, Sequence, Type
6+
from typing import Any, Callable, Sequence, Type
77

88
_SortComparisonMethod = Callable[[str, str], int]
9-
_SuiteClass = Callable[[List[unittest.case.TestCase]], unittest.suite.TestSuite]
9+
_SuiteClass = Callable[[list[unittest.case.TestCase]], unittest.suite.TestSuite]
1010

1111
class TestLoader:
1212
errors: list[Type[BaseException]]

stdlib/unittest/mock.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import sys
2-
from typing import Any, Callable, Generic, Iterable, List, Mapping, Sequence, Tuple, Type, TypeVar, overload
2+
from typing import Any, Callable, Generic, Iterable, Mapping, Sequence, Tuple, Type, TypeVar, overload
33

44
_F = TypeVar("_F", bound=Callable[..., Any])
55
_T = TypeVar("_T")
@@ -60,7 +60,7 @@ class _Call(Tuple[Any, ...]):
6060

6161
call: _Call
6262

63-
class _CallList(List[_Call]):
63+
class _CallList(list[_Call]):
6464
def __contains__(self, value: Any) -> bool: ...
6565

6666
class _MockIter:

stdlib/wsgiref/headers.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
from typing import List, Pattern, Tuple, overload
1+
from typing import Pattern, Tuple, overload
22

3-
_HeaderList = List[Tuple[str, str]]
3+
_HeaderList = list[Tuple[str, str]]
44

55
tspecials: Pattern[str] # undocumented
66

stdlib/xmlrpc/client.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ from _typeshed import Self, SupportsRead, SupportsWrite
66
from datetime import datetime
77
from io import BytesIO
88
from types import TracebackType
9-
from typing import Any, Callable, Dict, Iterable, List, Mapping, Protocol, Tuple, Type, Union, overload
9+
from typing import Any, Callable, Dict, Iterable, Mapping, Protocol, Tuple, Type, Union, overload
1010
from typing_extensions import Literal
1111

1212
class _SupportsTimeTuple(Protocol):
1313
def timetuple(self) -> time.struct_time: ...
1414

1515
_DateTimeComparable = Union[DateTime, datetime, str, _SupportsTimeTuple]
16-
_Marshallable = Union[None, bool, int, float, str, bytes, Tuple[Any, ...], List[Any], Dict[Any, Any], datetime, DateTime, Binary]
16+
_Marshallable = Union[None, bool, int, float, str, bytes, Tuple[Any, ...], list[Any], Dict[Any, Any], datetime, DateTime, Binary]
1717
_XMLDate = Union[int, datetime, Tuple[int, ...], time.struct_time]
1818
_HostType = Union[Tuple[str, Dict[str, str]], str]
1919

stdlib/xmlrpc/server.pyi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import pydoc
33
import socketserver
44
import sys
55
from datetime import datetime
6-
from typing import Any, Callable, Dict, Iterable, List, Mapping, Pattern, Protocol, Tuple, Type, Union
6+
from typing import Any, Callable, Dict, Iterable, Mapping, Pattern, Protocol, Tuple, Type, Union
77
from xmlrpc.client import Fault
88

99
_Marshallable = Union[
10-
None, bool, int, float, str, bytes, Tuple[Any, ...], List[Any], Dict[Any, Any], datetime
10+
None, bool, int, float, str, bytes, Tuple[Any, ...], list[Any], Dict[Any, Any], datetime
1111
] # TODO: Recursive type on tuple, list, dict
1212

1313
# The dispatch accepts anywhere from 0 to N arguments, no easy way to allow this in mypy
@@ -34,7 +34,7 @@ class _DispatchArityN(Protocol):
3434
_DispatchProtocol = Union[_DispatchArity0, _DispatchArity1, _DispatchArity2, _DispatchArity3, _DispatchArity4, _DispatchArityN]
3535

3636
def resolve_dotted_attribute(obj: Any, attr: str, allow_dotted_names: bool = ...) -> Any: ... # undocumented
37-
def list_public_methods(obj: Any) -> List[str]: ... # undocumented
37+
def list_public_methods(obj: Any) -> list[str]: ... # undocumented
3838

3939
class SimpleXMLRPCDispatcher: # undocumented
4040

@@ -57,10 +57,10 @@ class SimpleXMLRPCDispatcher: # undocumented
5757
dispatch_method: Callable[[str | None, Tuple[_Marshallable, ...]], Fault | Tuple[_Marshallable, ...]] | None = ...,
5858
path: Any | None = ...,
5959
) -> str: ... # undocumented
60-
def system_listMethods(self) -> List[str]: ... # undocumented
60+
def system_listMethods(self) -> list[str]: ... # undocumented
6161
def system_methodSignature(self, method_name: str) -> str: ... # undocumented
6262
def system_methodHelp(self, method_name: str) -> str: ... # undocumented
63-
def system_multicall(self, call_list: List[Dict[str, _Marshallable]]) -> List[_Marshallable]: ... # undocumented
63+
def system_multicall(self, call_list: list[Dict[str, _Marshallable]]) -> list[_Marshallable]: ... # undocumented
6464
def _dispatch(self, method: str, params: Iterable[_Marshallable]) -> _Marshallable: ... # undocumented
6565

6666
class SimpleXMLRPCRequestHandler(http.server.BaseHTTPRequestHandler):

0 commit comments

Comments
 (0)