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

Command line tests in `test-data/unit/cmdline.test` are very slow since they use full typeshed stubs and run mypy in a subprocess. It looks like many of them would be easy to...

priority-0-high
topic-developer
good-first-issue
topic-tests

Fixes #8874 . When raising an error involving passing ```**kwargs```, this PR adds a note informing the user of a potential fix based on @JukkaL's [suggestion](https://github.com/python/mypy/issues/8874#issuecomment-1186134745). For example, ``` main:3:...

**Bug Report** I am using Stubgen to type my files. Here, I have a class with a lot of instance attributes. They are all declared within the `__init__` method. They...

feature
topic-stubgen

**Crash Report** Mypy Daemon crashed attempting to generate type suggestions for `__reduce__` function in class with nonstandard `__new__`. (re-creating #15823) **Traceback** ``` dmypy suggest crash.py:64: error: INTERNAL ERROR -- Please...

crash
topic-daemon

**Bug Report** I'm getting an "Invalid self argument ... to attribute function" error when inheriting and simultaneously augmenting the TypeVarTuple. The error happens only when calling attribute functions, and not...

bug
topic-pep-646

[It's difficult to believe this hasn't been reported before, but, with apologies, I haven't been able to find an open issue describing this.] **Bug Report** Mypy doesn't support using `@property`...

bug
topic-descriptors

**Bug Report** Applying `TypeIs` to narrow type of an iterable results in too optimistic reachability analysis. **To Reproduce** ```python from collections.abc import Iterable from typing_extensions import TypeIs def is_iterable_int(val: Iterable[object])...

bug

When I run mypy on the following code: ```py from types import MethodType from typing import Callable def describe(func: Callable[[], None]) -> str: if isinstance(func, MethodType): return 'bound method' else:...

bug
priority-1-normal
topic-protocols
false-positive
topic-calls

Reopened from #7845 as requested mypy seems to ignore the ``@final`` decorator when it is applied to a TypedDict. This issue becomes material when one invokes the items() or values()...

feature
topic-typed-dict
priority-1-normal
topic-final

I noticed something really weird about callback protocols. Consider the following example: ```python from typing import TypeVar, Protocol T = TypeVar("T") class MyCallable(Protocol[T]): __name__: str def __call__( self, __arg: T,...

bug