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

See https://github.com/python/typing-council/issues/11

I get a spurious `top/fid/yod.py:6: error: "File" both defines "__slots__" and is used with "slots=True" [misc]`. Similar to https://github.com/python/mypy/issues/11821 / https://github.com/python/mypy/issues/11827, but a more involved repro. I found it not...

bug
topic-dataclasses

**Bug Report** This is admittedly a fairly niche use-case, but this came up when adding more precise type hints to `itsdangerous` and trying to write a `Protocol` that accepts any...

bug
topic-paramspec

**Crash Report** mypy crashes when it encounters an overload signature containing a TypeVarTuple like: ``` @overload def cast( self, typ: type[MyType[SomeOtherTypeVar, *TheTupleTs]] ) -> MyType[SomeOtherTypeVar, *TheTupleTs]: ... ``` **Traceback** ```...

crash
topic-pep-646

**Bug Report** On mypy 1.9.0, this code suggests, somewhat nonsensically, `__enter__` because `__aiter__` does not exist despite the reference to `__aiter__` being entirely implicit in the async for loop: ```python...

bug

**Bug Report** I've been having the issue that Mypy suddenly no longer type checks the contents of my imports, even though they are in the same source tree. After bisecting...

bug

Required for https://github.com/python/typeshed/pull/11662 Discussion: https://discuss.python.org/t/allow-self-binding-for-generic-paramspec/50948

topic-paramspec

**Bug Report** If I don't put any `Any` (and don't import anything with `Any`), there shouldn't be any `Any` . But if I use `isinstance` to narrow to a generic,...

bug

Mypy crashes on `loop.run_in_executor` with the message "Parameters cannot be constrained to" (A clear and concise description of what the bug is.) Run `mypy aio_processes.py` aio_processes.py: ```python import asyncio import...

crash

```python from collections.abc import Callable from typing import Literal, TypeVar, Generic from typing_extensions import assert_never T = TypeVar("T") def doit_if(t: T, fn: Callable[[T], Literal[1, -1]]) -> None: result = fn(t)...

bug
topic-literal-types
topic-type-narrowing