mypy
mypy copied to clipboard
Optional static typing for Python
**To Reproduce** ```python from somewhere import Foo match None: case Foo(): ... ``` https://mypy-play.net/?mypy=latest&python=3.11&flags=ignore-missing-imports&gist=03694364e4e855575f23ba9c625e804e **Expected Behavior** no error **Actual Behavior** ``` $ mypy --ignore-missing-imports test.py test.py:4: error: Expected type in...
The first error is a false positive, since `range` is available in builtins: ```py _range = range # error: Name "range" is used before definition _C = C # error:...
**Bug Report** The `dmypy` daemon will experience poor performance if there are a lot of files with errors, even if only a single file is updated. **To Reproduce** Create a...
```py from typing import Callable (lambda: 1)() # no error a = lambda: 1 b: Callable[[], int] = lambda: 1 reveal_type(a) # Revealed type is "def () -> builtins.int" reveal_type(b)...
MyPy does not support property aliases. Example: ``` $ cat a.py class A: @property def f(self) -> int: return 1 g = f x: int = A().f y: int =...
In Mypy 0.800, it now checks files in subdirectories without `__init__.py` files. The problem is that the config still only works on modules containing `__init__.py`, meaning there is no way...
The 7.4.0 release of pytest broke mypy because we were using some undocumented, private API that was removed. Ideally we'd stop using the private API, but nobody seems to remember...
`lxml==4.9.3` was released yesterday which caused the wheel builder to fail again. https://github.com/mypyc/mypy_mypyc-wheels/actions/runs/5473072463/jobs/9966070811#step:4:6979 The `lxml` project decided to change the manylinux builds from `manylinux2014` to `manylinux_2_28`. Thus to test our...