-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Current problem
R0123: Comparison to literal (literal-comparison), which I think could be made more explicit. Maybe something like a.py:3:25: R0123: 'val_value is ""' could be replaced by 'val_value' (literal-comparison) (or bool(val_value) if it's not a context where we have an auto-cast to boolean ?)
Desired solution
Flake8 says : F632 use ==/!= to compare constant literals (str, bytes, int, float, tuple). we can also piggy back on the documentation for this flake8 check when pylint users search for the error messages.
Maybe we should include the words "Truth Value Testing" as this is the official wording in the Python docs, and people who want to know more can therefore easily find the page linked above.
'if val_value is ""' could be replaced by 'if val_value' (Truth Value Testing) (literal-comparison)