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
Suppose I del a variable in an Exception branch:
del
def my_fn(a: str) -> str: try: print(a) except Exception: del a raise else: return a
a must always exist in the else branch, but Ruff claims it's undefined:
a
else
~$ ruff foobar.py --isolated foobar.py:8:16: F821 Undefined name `a` Found 1 error.
(line 8 char 16 is the location of the a in the return statement)
This is on version 0.0.281:
~$ ruff --version ruff 0.0.281
The text was updated successfully, but these errors were encountered:
Thanks for the report!
Sorry, something went wrong.
No branches or pull requests
Suppose I
del
a variable in an Exception branch:a
must always exist in theelse
branch, but Ruff claims it's undefined:(line 8 char 16 is the location of the
a
in the return statement)This is on version 0.0.281:
The text was updated successfully, but these errors were encountered: