zephyr_commit_rules.py: Fix pylint warning by simplifying conditional

Non-empty sequences are truthy in Python, so len() can be skipped in
tests.

Fixes this pylint warning:

    scripts/gitlint/zephyr_commit_rules.py:115:11: C1801: Do not use
    `len(SEQUENCE)` to determine if a sequence is empty
    (len-as-condition)

Fixing warnings for a CI check.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This commit is contained in:
Ulf Magnusson 2019-09-02 14:38:31 +02:00 committed by Anas Nashif
commit 1c57b223ef

View file

@ -112,7 +112,7 @@ class MaxLineLengthExceptions(LineRule):
if line.startswith('Signed-off-by'):
return
if len(urls) > 0:
if urls:
return
if len(line) > max_length: