Upgrade mypy to 0.990 (#9123)

This commit is contained in:
Alex Waygood
2022-11-07 19:20:47 +00:00
committed by GitHub
parent 94dc53ee90
commit 4f381af4c5
5 changed files with 18 additions and 4 deletions

View File

@@ -5,7 +5,7 @@ flake8-bugbear==22.10.27 # must match .pre-commit-config.yaml
flake8-noqa==1.2.9 # must match .pre-commit-config.yaml
flake8-pyi==22.10.0 # must match .pre-commit-config.yaml
isort==5.10.1 # must match .pre-commit-config.yaml
mypy==0.982
mypy==0.990
packaging==21.3
pathspec
pycln==2.1.1 # must match .pre-commit-config.yaml

View File

@@ -179,6 +179,7 @@ if sys.version_info >= (3, 9):
self, mode: str, buffering: int = ..., encoding: str | None = ..., errors: str | None = ..., newline: str | None = ...
) -> IO[Any]: ...
@property
@abstractmethod
def name(self) -> str: ...
@abstractmethod
def __truediv__(self, child: str) -> Traversable: ...

View File

@@ -15,7 +15,7 @@ class Waiter:
async def foo() -> int:
...
return 42
async def main() -> None:

View File

@@ -16,11 +16,13 @@ _VT = TypeVar("_VT")
class KeysAndGetItem(Generic[_KT, _VT]):
data: Dict[_KT, _VT]
def keys(self) -> Iterable[_KT]:
...
return self.data.keys()
def __getitem__(self, __k: _KT) -> _VT:
...
return self.data[__k]
kt1: KeysAndGetItem[int, str] = KeysAndGetItem()

View File

@@ -438,6 +438,17 @@ types.WrapperDescriptorType.__get__
typing.[A-Z]\w+
typing_extensions\..*
# These are abstract properties at runtime,
# but marking them as such in the stub breaks half the the typed-Python ecosystem (see #8726)
typing.IO.closed
typing.IO.mode
typing.IO.name
typing.TextIO.buffer
typing.TextIO.encoding
typing.TextIO.errors
typing.TextIO.line_buffering
typing.TextIO.newlines
# Typing-related weirdness
_collections_abc.Callable
_typeshed.* # Utility types for typeshed, doesn't exist at runtime