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

If `mypy --show-column-numbers --show-error-end` thinks a function is missing a return statement, the entire function is the error. This is also the case for `note: defined here` which appears, for...

**Bug Report** I think this is a bug, as I get inconsistent results across multiple invocations. Depending on how I define a Type Alias, it can or can not be...

bug

**Feature** Run `stubgen --include-docstrings -p $STDLIB_PACKAGE --typeshed` (?) or some other way and have it generate a stub that has the same syntax as the typeshed with docstrings included. **Pitch**...

feature

Add a test demonstrating #12998.

**Bug Report** **To Reproduce** Here are 3 variations on creating `IntEnum` or `StrEnum` using [functional API syntax](https://docs.python.org/3/library/enum.html#functional-api). [testing1.py](https://mypy-play.net/?mypy=latest&python=3.12&gist=550b246072c815b2f25029057e1a60db): (Success) ```python UpperSeat = IntEnum("UpperSeat", {"Seat1": 1, "Seat2": 2, "Seat3": 3}) ```...

bug

Currently we don't handle `__call__()` on metaclasses correctly. For example: ```python class M(type): def __call__(self, x: int) -> Any: ... class C(metaclass=M): ... C(x=1) ``` results in a false positive....

bug
priority-2-low
topic-protocols

### To Reproduce `test-mypy.py` ```python from abc import ABCMeta, abstractmethod class A(metaclass=ABCMeta): @abstractmethod def foo(self) -> None: pass class B1(A, metaclass=ABCMeta): pass class B2(A, metaclass=ABCMeta): pass class C1(B1, B2): def...

bug

**Bug Report** When calling `functools.update_wrapper(f, g)` where `f` has a type of `TypeVar('T', Type1, Type2)`, mypy errors incorrectly, saying it expects `Callable[[Never], Never]` in that spot. **To Reproduce** https://mypy-play.net/?mypy=latest&python=3.12&gist=8b79db2fe7eb042e15122536a393dd43 **Expected...

bug

**Crash Report** INTERNAL ERROR **Traceback** ``` /home/aljaz/EdgeDB/edgedb/edb/schema/inheriting.py: error: INTERNAL ERROR -- Please try using mypy master on GitHub: https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build Please report a bug at https://github.com/python/mypy/issues version: 1.11.0+dev.ba6febc903776491ea445cef2ef5375b95e178cd Traceback (most recent...

crash