coding style
This commit is contained in:
parent
967d1d17f9
commit
eb9db73d3d
1 changed files with 5 additions and 6 deletions
9
tools.py
9
tools.py
|
|
@ -358,12 +358,11 @@ def python_mccabe(path):
|
||||||
try:
|
try:
|
||||||
max_score = max(_get_mccabe_line_score(line, python_version)
|
max_score = max(_get_mccabe_line_score(line, python_version)
|
||||||
for line in stdout.splitlines())
|
for line in stdout.splitlines())
|
||||||
except ValueError:
|
except ValueError: # When there are no lines
|
||||||
status = Status.success
|
pass
|
||||||
else:
|
|
||||||
status = Status.failure if max_score > 10 else Status.success
|
status = Status.failure if max_score > 10 else Status.success
|
||||||
return status, fill3.Text(_colorize_mccabe(stdout, python_version,
|
return status, fill3.Text(
|
||||||
max_score))
|
_colorize_mccabe(stdout, python_version, max_score))
|
||||||
python_mccabe.dependencies = {"python-mccabe", "python3-mccabe"}
|
python_mccabe.dependencies = {"python-mccabe", "python3-mccabe"}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue