mypy
mypy copied to clipboard
Optional static typing for Python
I've seen an earlier issue on this closed (#2859) as well as a recent issue bringing up changelogs (#12210)! **Feature** Single file changelog, with changes release manager deems most significant...
**Bug Report** - Generators containing the `await` keyword are considered Generator, rather than AsyncGenerator - Generator syntax does not permit `await` in a non-async function **To Reproduce** test.py: ```python import...
I played with an update of mypy from 0.931 to 0.971. The new version fails with `error: "Callable[..., bool]" has no attribute "register"` The code is written oddly because of...
### Description Suggest an annotation of the form `Optional[]` when we show an error for an inferred partial `None` type (which I think should only happen when `--local-partial-types` is set)....
Resolves #12983.
Closes https://github.com/python/mypy/issues/10342 This PR allows `__init__` and `__new__` methods to return `NoReturn`, allowing for the annotation of classes that cannot be directly initialized (_e.g._ those that are defined in C...
**Feature** ```py from __future__ import annotations from typing import TypedDict class A(TypedDict, total=False): name: str class B(TypedDict, total=False): name: str def foo(data: A | B) -> None: ... # this...
Closes #11347