mypy
mypy copied to clipboard
Optional static typing for Python
Fixes #19839. Looks like it was relatively easy to do the right way, let me try! When splitting a callable/parameters into args and kwargs, we have the following options: *...
Relates to #18540 Adds a warning for redundant-annotation where a function local variable annotation type is the same as the inferred type Based heavily on the code from @asottile in...
Fixes #20275 and #20041 This code snippet fails to type-check before this PR: ``` class X: y: int def __eq__(self, other: object) -> bool: return type(other) is type(self) and other.y...
Fixes https://github.com/python/mypy/issues/20266 `semanal_enum.py` generally feels kinda strange, like `process_enum_call` feels redundant? The only thing it adds over simply making `semanal` do `check_enum_call` is... check that we aren't assigning to a...
**Bug Report** `--strict-equality-for-none` gives a false-positive `comparison-overlap` error when checking if a global `is None` in a loop. **To Reproduce** ```python # No playground link since playground doesn't support --strict-equality-for-none...