Tarek Ziadé committed de690f0 Merge


Comments (0)

Files changed (4)

 - Chris Adams
 - Ben Bass
 - Ask Solem
+- Steven Kryskalla
 - PyFlakes:
 - McCabe:
+Warning / Error codes
+Below are lists of all warning and error codes flake8 will generate, broken
+out by component.
+- E101: indentation contains mixed spaces and tabs
+- E111: indentation is not a multiple of four
+- E112: expected an indented block
+- E113: unexpected indentation
+- E201: whitespace after char
+- E202: whitespace before char
+- E203: whitespace before char
+- E211: whitespace before text
+- E223: tab / multiple spaces before operator
+- E224: tab / multiple spaces after operator
+- E225: missing whitespace around operator
+- E225: missing whitespace around operator
+- E231: missing whitespace after char
+- E241: multiple spaces after separator
+- E242: tab after separator
+- E251: no spaces around keyword / parameter equals
+- E262: inline comment should start with '# '
+- E301: expected 1 blank line, found 0
+- E302: expected 2 blank lines, found <n>
+- E303: too many blank lines (<n>)
+- E304: blank lines found after function decorator
+- E401: multiple imports on one line
+- E501: line too long (<n> characters)
+- E701: multiple statements on one line (colon)
+- E702: multiple statements on one line (semicolon)
+- W191: indentation contains tabs
+- W291: trailing whitespace
+- W292: no newline at end of file
+- W293: blank line contains whitespace
+- W391: blank line at end of file
+- W601: .has_key() is deprecated, use 'in'
+- W602: deprecated form of raising exception
+- W603: '<>' is deprecated, use '!='
+- W604: backticks are deprecated, use 'repr()'
+- W402: <module> imported but unused
+- W403: import <module> from line <n> shadowed by loop variable
+- W404: 'from <module> import ``*``' used; unable to detect undefined names
+- W405: future import(s) <name> after other statements
+- W801: redefinition of unused <name> from line <n>
+- W802: undefined name <name>
+- W803: undefined name <name> in __all__
+- W804: local variable <name> (defined in enclosing scope on line <n>) referenced before assignment
+- W805: duplicate argument <name> in function definition
+- W806: redefinition of function <name> from line <n>
+- W806: local variable <name> is assigned to but never used
+- W901: '<function_name>' is too complex ('<complexity_level>')
             # ?
         if graph.complexity() >= min:
-            msg = '%s:%d:1 %s %r is too complex (%d)' % (
+            msg = '%s:%d:1: %s %r is too complex (%d)' % (


         self.assertEqual(get_code_complexity(_GLOBAL, 1), 2)
         res ='\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)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.