mypy
mypy copied to clipboard
Optional static typing for Python
**Crash Report** I have been unable to use dmypy for a while due to recursion error, but finally took the time to figure out why. This seems to happen when...
**Bug Report** Mypy incorrectly reports method signature override inconsistencies with `MutableSequence` for subclasses of `deque`, even though the subclass method signature is consistent with the method signature in the `deque`...
Fixes https://github.com/python/mypy/issues/17691 This looks quite ad-hoc, but the only clean alternative is to remove the existing recursive types optimization we have in `subtypes.py`. But the best I can get without...
# description `mypy` crashes on a file that imports `torch.nn.functional` when `torchvision` is installed in conjunction with `--follow-imports=skip` flag. ## traceback ```bash $ mypy --show-traceback --follow-imports=skip harmless.py Traceback (most recent...
**Feature** Allow `mypy --no-module-detection` (or similar flag) to run without mypy attempting to map files as modules. For example, linting standalone scripts should not require module detection magic. **Pitch** Mypy...
**Bug Report** If you try to derive from multiple base classes that both define the same function returning `Self`, mypy incorrectly warns that the definitions are incompatible. **To Reproduce** ```python...
False positive error: Overloaded function signatures 1 and 2 overlap with incompatible return types
#### Are you reporting a bug, or opening a feature request? Bug. #### Please insert below the code you are checking with mypy, or a mock-up repro if the source...
**Bug Report** I'm using `stubgen` to generate stubs for an untyped package. Because the docstrings are assembled at runtime, I want to include them in the stubs such that IDEs...
**Bug Report** On windows, .pyw is a valid extension for Python files (to be executed by pythonw.exe). mypy however assumes files with .pyw extension to have module name `__main__`. This...
**Bug Report** When combining `Self` and base class overloads, `mypy` incorrectly warns about the former being "the same or broader" as the latter. However, those overloads are both actually used....