basedmypy
basedmypy copied to clipboard
`redundant-expr` doesn't work on `isinstance` unless it's a variable
Describe the problem, ie expected/actual result (if it's not blatantly obvious)
No response
Gist to reproduce
# mypy: enable-error-code=redundant-expr
if isinstance(1, str): # no error
...
b = 1
if isinstance(b, str): # error
...
- upstream: https://github.com/python/mypy/issues/16769