diff options
| author | Tarek Ziade <tarek@ziade.org> | 2012-02-28 00:09:27 +0100 |
|---|---|---|
| committer | Tarek Ziade <tarek@ziade.org> | 2012-02-28 00:09:27 +0100 |
| commit | b9c0ac5a114701c6df273f173a62dc2a0168869a (patch) | |
| tree | fce0270e2a626d24b12d0a475c4e333372c4fec3 /flake8 | |
| parent | 75d33659263bc46619133e4855ce020b60632a2f (diff) | |
| parent | 99bd4737e20e61f337b7501bdbb96eb0e25dbe07 (diff) | |
| download | flake8-1.2.tar.gz | |
merged1.2
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) |
