Use PEP 585 syntax wherever possible (#6717)

This commit is contained in:
Alex Waygood
2021-12-28 10:31:43 +00:00
committed by GitHub
parent e6cb341d94
commit 8d5d2520ac
237 changed files with 966 additions and 1069 deletions

View File

@@ -1,5 +1,5 @@
import sys
from typing import Any, Awaitable, Callable, Generic, Iterable, List, Mapping, Sequence, Tuple, Type, TypeVar, overload
from typing import Any, Awaitable, Callable, Generic, Iterable, Mapping, Sequence, Type, TypeVar, overload
_T = TypeVar("_T")
_TT = TypeVar("_TT", bound=Type[Any])
@@ -96,7 +96,7 @@ class _Call(tuple[Any, ...]):
call: _Call
class _CallList(List[_Call]):
class _CallList(list[_Call]):
def __contains__(self, value: Any) -> bool: ...
class Base:
@@ -155,7 +155,7 @@ class NonCallableMock(Base, Any):
call_args_list: _CallList
mock_calls: _CallList
def _format_mock_call_signature(self, args: Any, kwargs: Any) -> str: ...
def _call_matcher(self, _call: Tuple[_Call, ...]) -> _Call: ...
def _call_matcher(self, _call: tuple[_Call, ...]) -> _Call: ...
def _get_child_mock(self, **kw: Any) -> NonCallableMock: ...
class CallableMixin(Base):