use-implicit-booleaness-not-len / C1802#

Message emitted:

Do not use len(SEQUENCE) without comparison to determine if a sequence is empty


Used when Pylint detects that len(sequence) is being used without explicit comparison inside a condition to determine if a sequence is empty. Instead of coercing the length to a boolean, either rely on the fact that empty sequences are false or compare the length against a scalar.

Correct code:

# This is a placeholder for correct code for this message.

Additional details:

You can help us make the doc better by contributing !

Created by the refactoring checker.