mirror of https://github.com/zulip/zulip.git
refactor: Check for empty list with `len(X) == 0` instead of `not X`.
This commit is contained in:
parent
750769f637
commit
5ada385b91
|
@ -45,7 +45,7 @@ def bright_red_output():
|
|||
|
||||
def check_pyflakes(options, by_lang):
|
||||
# type: (Any, Dict[str, List[str]]) -> bool
|
||||
if not by_lang['py']:
|
||||
if len(by_lang['py']) == 0:
|
||||
return False
|
||||
failed = False
|
||||
pyflakes = subprocess.Popen(['pyflakes'] + by_lang['py'],
|
||||
|
@ -671,7 +671,7 @@ def run():
|
|||
@lint
|
||||
def css():
|
||||
# type: () -> int
|
||||
if not by_lang['css']:
|
||||
if len(by_lang['css']) == 0:
|
||||
return 0
|
||||
result = subprocess.call(['tools/check-css'] + by_lang['css'])
|
||||
return result
|
||||
|
@ -688,7 +688,7 @@ def run():
|
|||
@lint
|
||||
def puppet():
|
||||
# type: () -> int
|
||||
if not by_lang['pp']:
|
||||
if len(by_lang['pp']) == 0:
|
||||
return 0
|
||||
result = subprocess.call(['puppet', 'parser', 'validate'] + by_lang['pp'])
|
||||
return result
|
||||
|
|
Loading…
Reference in New Issue