We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
F841 does not report variables that are unused in certain branches. Below is a short example (playground) showing the issue
def func(x): if x: io = "" else: io = "foo" print(io)
This issue was originally reported to pyflakes and closed as duplicate of PyCQA/pyflakes#715.
They mention is unlikely they will implement branch analysis, but ruff already has (I guess) the machinery needed to support this use case.
v0.11.0 (playground)
The text was updated successfully, but these errors were encountered:
Actually, Ruff doesn't have the machinery to support this, but we're working on it. But it's going to take a while to get ready for prime time ;)
Sorry, something went wrong.
No branches or pull requests
Summary
F841 does not report variables that are unused in certain branches. Below is a short example (playground) showing the issue
This issue was originally reported to pyflakes and closed as duplicate of PyCQA/pyflakes#715.
They mention is unlikely they will implement branch analysis, but ruff already has (I guess) the machinery needed to support this use case.
Version
v0.11.0 (playground)
The text was updated successfully, but these errors were encountered: