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
Related to #3517: C1901 leads to false positives with numpy as well.
desc = np.array(("","","")) np.all(desc == "") # is valid np.all(not desc) # is not valid
ruff 0.0263
PLC1901 desc == "" can be simplified to not desc as an empty string is falsey
desc == ""
not desc
The statment "can be simplified to not desc" is wrong.
The text was updated successfully, but these errors were encountered:
We made this rule require explicit opt-in, so closing for now.
Sorry, something went wrong.
No branches or pull requests
Related to #3517: C1901 leads to false positives with numpy as well.
ruff 0.0263
The statment "can be simplified to
not desc
" is wrong.The text was updated successfully, but these errors were encountered: