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** My goal is to check all the ignored `inline` mypy errors/warnings **Pitch** People often added inline comment `# type: ignore` to ignore mypy error for a specific line, but...

feature

**Bug Report** `mypyc` fails to compile a class with a `property` `setter` and `deleter` and a weakref attribute. **To Reproduce** 1. Defined (in a file `foo.py`) a class `Bar` with...

bug
topic-descriptors
topic-mypyc

### Description Migrates `fastparse.py` and `fastparse2.py`, `semanal.py`, `semanal_*.py` and `typeanal.py` to use the `ErrorMessage` class. The initial plan was to do only `fastparse` and `fastparse2`, but because of how intertwined...

The last remaining incomplete task from adopting black (#12424/#10996) is to add the [pre-commit GitHub app](https://github.com/marketplace/pre-commit-ci) to the mypy project. I believe only owners have permission to do so. (@JukkaL)

feature

```py P = ParamSpec("P") T = TypeVar("T") class C(Generic[P]): ... class G(Generic[T]): ... C[[[int]]] # no error # C[[[int]]] G[[[int]]] # error ```

bug
priority-2-low
topic-paramspec

**Bug Report** New to 0.971 (vs .961), when you have an attrs class with a normal attr, and then another with a converter function, your class gets marked with `...

bug
topic-attrs

Here is an example commit with the issue: https://github.com/eli-schwartz/meson/commit/4d204bb81869422a102264611d9aea314a1ac2ca mypy.ini: https://github.com/mesonbuild/meson/blob/27626124d0bdd89f5f276f70a73b4713aa3aac3d/.mypy.ini ``` $ mypy --version mypy 0.961 (compiled: yes) $ mypy mesonbuild/interpreter/primitives/string.py mesonbuild/interpreter/primitives/string.py:211:5: error: Return type "Tuple[str, str]" of "__getnewargs__"...

bug
false-positive
topic-inheritance

**Feature** I would like to insert `from typing import Union` when generated stub code by stubgen includes `Union`. **Pitch** ref: #12920 Now: ```shellsession # Python 3.10.4, mypy 0.960 $ cat...

feature
good-first-issue
topic-stubgen

**Bug Report** With mypy 0.961 I was able to scan my namespace packages without any issue. I've just upgraded today to 0.971, and I'm now getting a `Source file found...

bug

### Description Closes #11965. Add a --include-docstrings flag to stubgen. This was suggested in #11965 along with a use case. When using this flag, the .pyi files will include docstrings...