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** We're experimenting under https://github.com/pybind/pybind11/pull/4888 with a pybind11 behavior change, to generate ``` Annotated[Any, CppTypePybind11("cpp_namespace::UserType")] ``` instead of a bare `cpp_namespace::UserType`. It seems like mypy does handle outer-level `Annotated`,...

bug
topic-stubgen

**Bug Report** Using pybind11 v2.12.0 allows adding typing annotations for things. And it works great for most types but fails to properly parse the tuple special cases and so the...

bug
topic-stubgen

**Bug Report, To Reproduce, & Actual Behaviour** See [mypy Playground](https://mypy-play.net/?mypy=latest&python=3.12&flags=strict&gist=b603bd370c2ab88c8ce1e8007819125c) ```python from abc import ABC, abstractmethod class Abstract(ABC): @abstractmethod def method(self) -> None: ... class Unimplemented(Abstract): ... class Parent: others:...

bug

**Bug Report** Narrowing an `int` into a `Literal` via pattern matching is not working, please see example below. **To Reproduce** Python 3.12.2 ```python from typing import Literal, reveal_type import numpy...

bug
topic-literal-types
topic-match-statement

```py from contextlib import contextmanager from typing import Iterator @contextmanager def foo() -> Iterator[None]: yield class Bar: @property def asdf(self) -> int: return 2 class Baz(Bar): @property def asdf(self) ->...

bug
topic-inheritance
topic-descriptors

Hi guys, I am trying to add mypy support for dataclassy, which is a replacement for standard dataclasses. You can see the code here: https://github.com/biqqles/dataclassy/blob/15cef524b55df2c65b39d1619c7b8f1a3d28a813/dataclassy/mypy.py One of the problems I've...

question
topic-plugins

- [ ] PEP 688 (#15313) - [x] PEP 692 (#14697) - [ ] PEP 695 (#15238, see issue for subtasks - [x] PEP 698 (#14072, but missing strict mode)...

feature
meta

There's a ton of new `enum` features in Python 3.11 that mypy doesn't yet support: - [x] `enum.property` - [ ] `enum.verify` - [x] `enum.(non)member` - [x] `ReprEnum` - [...

feature
meta
topic-enum

This adds on to the change in https://github.com/python/mypy/pull/17182 and fixes enum attributes being used as members. @hamdanal / @hauntsaninja I noticed there was the function `get_enum_values` in mypy types and...

topic-enum

**Bug Report** The `possibly-undefined` check is not catching a possibly unbound variable when it's used within a `finally` block **To Reproduce** The following code raises `NameError: name 'val' is not...

bug
topic-possibly-undefined