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

**Feature** Example: ```py from collections.abc import Generator from typing import Any from typing_extensions import Self class MyAwaitable: def __await__(self) -> Generator[Any, None, Self]: return self.do_something().__await__() async def do_something(self) -> Self:...

feature
topic-async

Hi, I discovered an issue about match case statement. If I use match case and match against single variable, then variable's type is inferred correctly in instructions contained within case....

bug

**Bug Report** _(Although there are other issues that allude to this problem, I haven't been able to locate an issue which specifically addresses truthiness where `__bool__()` is defined and `@final`....

bug
topic-type-narrowing

**Documentation** Comment at [mypy/main.py#L503C5-L503C5](https://github.com/python/mypy/blob/b995e1620789a3ab2fc5dbcf0698a9077b0f5731/mypy/main.py#L503C5-L503C5) references [missing documentation](https://github.com/python/mypy/wiki/Documentation-Conventions).

documentation
topic-developer

**Crash Report** Creating a `TypedDict` with non-literal keys gives `TypedDict() expects a dictionary literal as the second argument`. Attempting to ignore this with `# type: ignore` causes an `AssertionError` if...

topic-incremental
crash
topic-typed-dict

**Feature** Apply type narrowing in case of `x is not C` where `x` is of type `Union[type[C], SomethingElse]`, from that union to `SomethingElse` in case when `C` is made `final`....

feature
topic-type-narrowing
topic-final

**Bug Report** mypy gives inconsistent errors with regard to instantiating classes that derive from a common abstract base class when the derived classes are accessed via a list. The errors...

bug

**Bug Report** I have a folder on my project with some python files, when I try to specify mypy to run against it, it returns the message: > There are...

bug

**Bug Report** Similar to #7778, where having a function that returns a decorator inside a class without a self parameter is not possible. **To Reproduce** I have this setup to...

bug

**Feature** In mypy, we can do something like `# type: ignore [error-code]` For some developer tools, we can use some blockwise settings, ex: ``` # fmt: off blabla # fmt:...

feature