From eb9db73d3d899748a2e1fdfafe64a983e14323c1 Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Sat, 9 Jan 2016 19:40:41 +0000 Subject: [PATCH] coding style --- tools.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tools.py b/tools.py index 1f01530..79e540d 100644 --- a/tools.py +++ b/tools.py @@ -358,12 +358,11 @@ def python_mccabe(path): try: max_score = max(_get_mccabe_line_score(line, python_version) for line in stdout.splitlines()) - except ValueError: - status = Status.success - else: - status = Status.failure if max_score > 10 else Status.success - return status, fill3.Text(_colorize_mccabe(stdout, python_version, - max_score)) + except ValueError: # When there are no lines + pass + status = Status.failure if max_score > 10 else Status.success + return status, fill3.Text( + _colorize_mccabe(stdout, python_version, max_score)) python_mccabe.dependencies = {"python-mccabe", "python3-mccabe"}