You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a check for if statement conditions which are non-empty tuples (#512)
* Add a check for if statement conditions which are non-empty tuples
With the increasing prevalence of wrapping conditionals like:
if (
some_value != 'some_condition' and
other_value is not 42
)
and for wrapping other constructs with trailing commas, like:
x = (
some_value,
other_value,
)
it becomes quite easy to accidentally combine these into a
conditional statement which is actually always true:
if (
some_value != 'some_condition' and
other_value is not 42,
)
This commit introduces a check for such constructs.
* Make this error message make sense
* Further clarity this message's docstring
Co-Authored-By: Ran Benita <[email protected]>
Co-authored-by: Ran Benita <[email protected]>
0 commit comments