mypy icon indicating copy to clipboard operation
mypy copied to clipboard

Optional static typing for Python

Results 1055 mypy issues
Sort by recently updated
recently updated
newest added

Followup to https://github.com/python/mypy/pull/15586 This will be the last one 🚀

Followup to https://github.com/python/mypy/pull/15586

Followup to https://github.com/python/mypy/pull/15586

Opening files with the same variable name in with statements in if statements fails type checks if the type of the result of the with statement is different. In this...

bug

First of all, I'm using Mypy 0.770. I'd like to annotate a function in the following way: ```python T = TypeVar('T') class JSONSerialized(str, Generic[T]): """Strong type for the JSON serialized...

feature
topic-type-variables
topic-overloads

**Documentation** This issue is being created as a request to provide guidance in the official Mypy documentation about the recommended best practices and approaches that users should use when adding...

documentation

Add the strict mode for [PEP 698](https://peps.python.org/pep-0698/#strict-enforcement-per-project). Closes: #14072

Currently, MyPy doesn't report an error when a variable is imported in the `if TYPE_CHECKING` block and then used elsewhere. For example, MyPy accepts this code: ```python from typing import...

feature
priority-1-normal
topic-runtime-semantics

The following code produces a false positive: ```py from collections import namedtuple from typing import Any T = namedtuple("T", ["x"]) class C(T): def f(self) -> bool: return True c: C...

bug
topic-named-tuple