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

When I run mypy check, everything seems to be ok. If I compile the code using mypyc and execute the compiled code, at runtime , I get the error "...

bug
topic-mypyc

Currently mypy only suggests installing stub packages if they're from typeshed. This restriction is important, because package installation can result in arbitrary code execution; potentially automatically when using `--install-types`. However,...

feature

``` 👉 ${c:test.py} = "a = 1" 👉 dmypy start Daemon started 👉 dmypy check test.py Success: no issues found in 46 source files 👉 dmypy inspect test.py:1:1:1:1 No known...

bug
topic-daemon

``` 👉 New-Item test.py 👉 dmypy start Daemon started 👉 dmypy check test.py Success: no issues found in 46 source files 👉 dmypy check test.py Success: no issues found in...

bug
topic-daemon

Mypy doesn't complain about this, even though it fails at runtime with an exception: ```py class B: @property def x(self) -> int: return 0 class C(B): x: int def __init__(self)...

bug
topic-descriptors

**Documentation** Docs for [`--install-types` and `--non-interactive`](https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-install-types) do not mention [`.mypy-cache`](https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-cache-dir) yet these options often fail (esp. in GitHub Actions, tox, pre-commit) with `error: --install-types failed (no mypy cache directory)` even...

documentation

**Bug Report** A constrained `typing.TypeVar` object's attributes does not appear to type-narrow properly. **To Reproduce & Actual Behaviour** In the following example, an AST node transformation is trying to unravel...

bug

```py from typing import List, ParamSpec P = ParamSpec('P') def foo(x: List[P]) -> None: ... ``` ``` test.py:5:13: error: Invalid location for ParamSpec "P" [misc] test.py:5:18: note: You can use...

bug
topic-paramspec
topic-error-reporting

**Bug Report** Consider the following code, where `wrap` is some decorator that preserves the function signature: ```python class Base: def f(self, a: int) -> int: return a + 1 def...

bug
topic-type-context
topic-inference

The following should be an error, but it currently is not. ```python from collections.abc import Callable from typing import Any def f(call: Callable[..., Any]) -> None: print(call.__name__) # why is...