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 <ran234@gmail.com>
Co-authored-by: Ran Benita <ran234@gmail.com>3 files changed