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

This PR adds a new mypyc primitive for `weakref.ref` I wasn't able to figure out what name mypyc expects for `weakref.proxy`, so I took that out and will keep that...

These are some of the remaining tasks after https://github.com/python/mypy/issues/7724 is done. These are either somewhat tricky and/or somewhat boring and/or less pressing. In no particular order: * We should cleanup/unify...

refactoring
priority-1-normal
meta

Fixes #18323 Mypy's current approach to detecting deprecated overloads of functions and methods that I implemented has many drawbacks. For example, it does not handle some kinds of unions (see...

Refs https://github.com/mypyc/mypyc/issues/838 This PR populates `__text_signature__` for compiled functions, making runtime signature introspection possible (i.e. `inspect.signature(func)`). While `__text_signature__` is an undocumented CPython implementation detail, other extension module generators are using...

topic-mypyc

Fixes #19269 This PR refactors the logic implemented in #19118 (which only targeted repeatedly checked loops) and applies it to repeatedly checked finally clauses. I moved nearly all relevant code...

Fixes #14987 I was puzzled as to why my previous attempts to avoid false `unreachable` warnings for loops failed for issue #14987. After some debugging, I realised that the underlying...

I am planning to release 1.16 in the coming weeks. If there are any PRs you would like to ensure are included, please mention here. This issue will be updated...

meta

Although this can hide some mypy bugs, TBH this always bothered me as something conceptually wrong. The work on `checkmember` stuff inspired me to actually try it.

**Bug Report** I was testing [this PR](https://github.com/python/typeshed/pull/14282) (https://github.com/python/typeshed/issues/14283) for `typeshed` that simplifies `list.__add__` from ```python @overload def __add__(self, value: list[_T], /) -> list[_T]: ... @overload def __add__(self, value: list[_S], /)...

bug
topic-type-context

Fixes https://github.com/python/mypy/pull/15926#discussion_r1303520040, fixes #16200