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

Closes #13243. For the most part, in order to determine which fields where worth pattern matching against, I looked at what was being displayed in the `StrConv` class (defined in...

**Summary** Installing mypy on aarch64 via pip using command "pip3 install mypy" tries to build wheel from source code. **Problem description** mypy doesn't have wheel for aarch64 on PyPI repository....

feature

The following code: ```python from typing_extensions import assert_type assert_type(42, int) ``` fails to typecheck with the following message: ``` assert-type01.py:3: error: Expression is of type "int", not "int" ``` **Your...

bug
assert-type

### Description The following pattern is fairly common for specialised enum classes that provide additional attributes on enum members. It's used for `http.HTTPStatus` in the stdlib, and in 3.11, it's...

While working on #11128 I got hit by this. This code does not type check: ```python from typing import TypeVar, Union, List T1 = TypeVar("T1") def promote_list(item: Union[T1, List[T1]]) ->...

bug
topic-union-types

### Description Fixes #12774 Instead of relying only on hardcoded default value, first try to find out the actuall default value of a bool argument to a the class/attrib-maker decorators,...

```py from abc import ABC, abstractmethod class A(ABC): @property @abstractmethod def foo(self) -> str: ... class B(A): def foo(self) -> str: return "asdf" def get_foo(a: A) -> str: return a.foo...

bug
topic-runtime-semantics
topic-descriptors

I've gone through all scripts in `misc/` and `scripts/`. Here's what I found: 1. There was only one script in `scripts/`, so I moved it to `misc/`, not sure if...

**Bug Report** ``` % dmypy restart Daemon stopped Daemon started % dmypy run lib/testlib.py lib/testlib.py:46: error: Unexpected attribute "xxxx" for model "Xxxx" lib/testlib.py:142: error: The return type of a generator...

bug
topic-daemon
topic-error-reporting

We provide a `--strict` flag that is strict enough that we can not use it in mypy itself, which is one of the most carefully typed projects I know of....

needs discussion
topic-configuration