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:
parent
4a166f4913
commit
1c57b223ef
1 changed files with 1 additions and 1 deletions
|
@ -112,7 +112,7 @@ class MaxLineLengthExceptions(LineRule):
|
||||||
if line.startswith('Signed-off-by'):
|
if line.startswith('Signed-off-by'):
|
||||||
return
|
return
|
||||||
|
|
||||||
if len(urls) > 0:
|
if urls:
|
||||||
return
|
return
|
||||||
|
|
||||||
if len(line) > max_length:
|
if len(line) > max_length:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue