8000 Upgrade mypy to 0.990 (#9123) · python/typeshed@4f381af · GitHub
[go: up one dir, main page]

Skip to content

Commit 4f381af

Browse files
authored
Upgrade mypy to 0.990 (#9123)
1 parent 94dc53e commit 4f381af

File tree

5 files changed

+18
-4
lines changed

5 files changed

+18
-4
lines changed

requirements-tests.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ flake8-bugbear==22.10.27 # must match .pre-commit-config.yaml
55
flake8-noqa==1.2.9 # must match .pre-commit-config.yaml
66
flake8-pyi==22.10.0 # must match .pre-commit-config.yaml
77
isort==5.10.1 # must match .pre-commit-config.yaml
8-
mypy==0.982
8+
mypy==0.990
99
packaging==21.3
1010
pathspec
1111
pycln==2.1.1 # must match .pre-commit-config.yaml

stdlib/importlib/abc.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ if sys.version_info >= (3, 9):
179179
self, mode: str, buffering: int = ..., encoding: str | None = ..., errors: str | None = ..., newline: str | None = ...
180180
) -> IO[Any]: ...
181181
@property
182+
@abstractmethod
182183
def name(self) -> str: ...
183184
@abstractmethod
184185
def __truediv__(self, child: str) -> Traversable: ...

test_cases/stdlib/asyncio/check_task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ async def join(self) -> None:
1515

1616

1717
async def foo() -> int:
18-
...
18+
return 42
1919

2020

2121
async def main() -> None:

test_cases/stdlib/builtins/check_dict.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@
1616

1717

1818
class KeysAndGetItem(Generic[_KT, _VT]):
19+
data: Dict[_KT, _VT]
20+
1921
def keys(self) -> Iterable[_KT]:
20-
...
22+
return self.data.keys()
2123

2224
def __getitem__(self, __k: _KT) -> _VT:
23-
...
25+
return self.data[__k]
2426

2527

2628
kt1: KeysAndGetItem[int, str] = KeysAndGetItem()

tests/stubtest_allowlists/py3_common.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,17 @@ types.WrapperDescriptorType.__get__
438438
typing.[A-Z]\w+
439439
typing_extensions\..*
440440

441+
# These are abstract properties at runtime,
442+
# but marking them as such in the stub breaks half the the typed-Python ecosystem (see #8726)
443+
typing.IO.closed
444+
typing.IO.mode
445+
typing.IO.name
446+
typing.TextIO.buffer
447+
typing.TextIO.encoding
448+
typing.TextIO.errors
449+
typing.TextIO.line_buffering
450+
typing.TextIO.newlines
451+
441452
# Typing-related weirdness
442453
_collections_abc.Callable
443454
_typeshed.* # Utility types for typeshed, doesn't exist at runtime

0 commit comments

Comments
 (0)
0