diff options
Diffstat (limited to 'flake8')
| -rw-r--r-- | flake8/mccabe.py | 2 | ||||
| -rw-r--r-- | flake8/tests/test_mccabe.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/flake8/mccabe.py b/flake8/mccabe.py index c41334c..5e55f2f 100644 --- a/flake8/mccabe.py +++ b/flake8/mccabe.py @@ -243,7 +243,7 @@ def get_code_complexity(code, min=7, filename='stdin'): # ? continue if graph.complexity() >= min: - msg = '%s:%d:1 %s %r is too complex (%d)' % ( + msg = '%s:%d:1: %s %r is too complex (%d)' % ( filename, graph.lineno, WARNING_CODE, diff --git a/flake8/tests/test_mccabe.py b/flake8/tests/test_mccabe.py index 42032f2..887599f 100644 --- a/flake8/tests/test_mccabe.py +++ b/flake8/tests/test_mccabe.py @@ -36,6 +36,6 @@ class McCabeTest(unittest.TestCase): self.assertEqual(get_code_complexity(_GLOBAL, 1), 2) self.out.seek(0) res = self.out.read().strip().split('\n') - wanted = ["stdin:5:1: 'a' is too complex (4)", - 'stdin:Loop 2 is too complex (2)'] + wanted = ["stdin:5:1: W901 'a' is too complex (4)", + "stdin:2:1: W901 'Loop 2' is too complex (2)"] self.assertEqual(res, wanted) |
