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

_After being a bit late with Python 3.13, I figured to start testing 3.14 early this time._ With Python `3.14.0a1` the following fails: ```py # native.py from typing import Any...

bug
topic-mypyc

**Feature** Allow for e.g. ```toml [[tool.mypy.overrides]] files = ["scripts/*", "tests/*"] disallow_any_explicit = false ``` **Pitch** Currently, it appears one can only apply overrides for certain modules (and their children). This...

feature

**Crash Report** Mypyc fails to compile a class that has a property with a deleter, crashing with an internal error instead of giving proper mypy error messages. (Mypy check passes.)...

crash
topic-descriptors
topic-mypyc

```py from abc import ABC, ABCMeta from typing import Protocol a: ABCMeta a = Protocol # erm, error: "type[type]" is not assignable to "type[ABCMeta]" a = ABC ``` # mypy...

bug
topic-runtime-semantics

```py class Foo(type): def foo(cls) -> None: ... class Bar(Foo): def asdf(cls) -> None: cls.foo() class Baz(metaclass=Bar): # no error. # at runtime it raises TypeError: Baz.foo() missing 2 required...

bug

Prior to this change passing `--include-docstrings` did not generate docstrings for classes or properties, only functions. This PR brings c-extensions up to parity with pure-python modules. I used this feature...

This fixes an issue with the computation of `FunctionContext.fullname` for nested classes. For a module named `spangle`, with the following classes: ```python class Foo: class Bar: pass ``` The previous...

**Bug Report** Given a class context (eg. class `class Foo[T]`), mypy fails to infer the generic parameter when used as part of a type alias that is declared in the...

bug
topic-pep-695

In this example (from #982) we define an attribute via assignment in `__new__`: ``` class C(object): def __new__(cls, foo=None): obj = object.__new__(cls) obj.foo = foo return obj x = C(foo=12)...

feature
priority-0-high
false-positive

**Bug Report** Mypy raises `call-overload` when attempting to call an overloaded superclass constructor, if the overload hinges on literal `True` and `False` values and the call passes a `bool` value....

bug