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

Here's a simple example of this bug: ```python # runtime implementation class A(type): def method(self) -> None: print('a') class B(metaclass=A): ... # This works: # B.method() ``` And: ```python #...

bug
topic-stubtest

Mypy's type checking works well in many cases, but there are some complex cases that are difficult to code for, and would be impossible or costly to check at runtime....

feature
priority-1-normal
topic-casts

**Bug Report** dmypy ignores flags and config file https://github.com/python/mypy/pull/11396#issuecomment-1048483794 > @sehyun-hwang This seems like a dmypy bug. It seems that dmypy ignores cli flags or config file flags in certain...

bug
topic-daemon
topic-configuration

I am working on a project which makes heavy use of Mypy AST trees/nodes. and it would be nice if there was less boilerplate when doing pattern matching against nodes...

feature

**Bug Report** mypyc can compile a parameterized dataclass, but it fails at import. **To Reproduce** 1. Make a file with ```python from __future__ import annotations from dataclasses import dataclass from...

bug
topic-dataclasses
topic-mypyc

Python version: 3.5.2 mypy version: 0.630 Bug of Feature request: Feature Request ---- When defining a class with `__slots__` mypy complains that the instance has no attribute, even if it...

feature
priority-1-normal
false-positive

**Bug Report** Given a stub like so: ```python from abc import ABCMeta class Y(metaclass=ABCMeta): ... class Z: foo: type[Y] ``` And a runtime like so: ```python from abc import ABCMeta...

bug
topic-stubtest

With the following example: ```python from typing import Literal dest: Literal["tata", "tutu"] for src in "tata", "tutu": dest = src ``` I'm getting: error: Incompatible types in assignment (expression has...

bug
topic-literal-types
topic-inference

**Bug Report** Mypy gives `arg-type` error when calling `map` with `sorted` as the mapping function. **To Reproduce** ``` x = list(map(sorted, [[1, 3, 2], [2, 5, 4, 0]])) assert x...

bug

Regression in `0.920` / `0.930` compared with `0.910`. ```py from typing import Any def func() -> Any: ... var = func() reveal_type(var) # Any assert isinstance(var, bool) reveal_type(var) # bool...

bug
priority-0-high
topic-type-narrowing