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
Comparisons return boolean values. No need to wrap it in a bool-call
# Bad bool(a == b) # Good a == b
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
$ astpretty --no-show-offsets /dev/stdin <<< `cat /home/moose/example.py` astpretty --no-show-offsets /dev/stdin <<< `cat /home/moose/example.py` Module( body=[ Expr( value=Call( func=Name(id='bool', ctx=Load()), args=[ Compare( left=Name(id='a', ctx=Load()), ops=[Eq()], comparators=[Name(id='b', ctx=Load())], ), ], keywords=[], ), ), ], type_ignores=[], )
SIM901: Add rule for unnecessary bool function calls (#90)
f5a2571
Closes #88
MartinThoma
Successfully merging a pull request may close this issue.
Explanation
Comparisons return boolean values. No need to wrap it in a bool-call
Example
The text was updated successfully, but these errors were encountered: