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

**Bug Report** When a function argument is annotated using a TypeVar with a bound that is a TypedDict, using `setdefault` on it leads to an error. **To Reproduce** ```python from...

bug

**Bug Report** **To Reproduce** Run the `dmypy` daemon as `dmypy run -- . --config-file pyproject.toml` **Expected Behavior** `dmypy` should respect [the part of its own documentation](https://mypy.readthedocs.io/en/stable/mypy_daemon.html#basic-usage) that states "You can...

bug

Closes #17570. This is my first contribution to mypy! 🐍 Added an error code for overlapping function signatures. Test in check-errorcodes.test is a derivative of this post: https://stackoverflow.com/q/69341607

When overload matching is ambiguous due to an `Any` argument, mypy typically looks at the return types of the potential matches. If the return types differ, it evaluates the return...

bug
topic-type-narrowing
topic-typeguard

**Bug Report** **TLDR:** If you have a zero-arg constructor of a native type, stubtest complains that `stub does not have *args argument "args"`. From what I understand, constructors of native...

bug
topic-stubtest

**Feature** MyPy could warn if a dataclass definition contains un-annotated attribute declarations. Attributes `d` and `e` in the following example would trigger the warning: ```python from dataclasses import dataclass @dataclass...

feature

Typeshed now uses default of `None` for the second and third argument to `Generator` and we've started to change instances of `Generator[..., None, None]` to just `Generator[...]`. For readability and...

feature

**Feature** When using pytest one can declare fixtures and also define a return type for them, which IDE's like Pycharm can then use to provide further code completion. Currently mypy...

feature

**Feature** Split error code `[type-arg]` into `[type-arg]` and `[type-arg-generic]` to allow disabling this check for generic errors, also to solve #3737. **Pitch** I have the same issue as described in...

feature