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
SIM103
else
See: https://github.com/sbdchd/flake8-pie#pie801-prefer-simple-return.
In that example:
# error def main(): if foo > 5: return True return False # error def main(): if foo > 5: return True else: return False # ok def main(): return foo > 5
We catch the second case, but not the first.
The text was updated successfully, but these errors were encountered:
libcst
@charliermarsh I'd like to give this a shot.
Sorry, something went wrong.
Great!
flake8-simplify
needless-bool
[flake8-simplify] Detect implicit else cases in needless-bool (…
526abeb
…`SIM103`) (#10414) Fixes #10402 ## Summary For SIM103, detect and simplify the following case: [playground link](https://play.ruff.rs/d98570aa-b180-495b-8600-5c4c3fd02526) ```python def main(): if foo > 5: return True return False ``` ## Test Plan Unit tested only.
ottaviohartman
Successfully merging a pull request may close this issue.
See: https://github.com/sbdchd/flake8-pie#pie801-prefer-simple-return.
In that example:
We catch the second case, but not the first.
The text was updated successfully, but these errors were encountered: