Guest User

Untitled

a guest
Jul 22nd, 2018
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.93 KB | None | 0 0
  1. # Error codes reference
  2.  
  3. ## pycodestyle
  4. ### Indentation
  5. * E101: indentation contains mixed spaces and tabs
  6. * E111: indentation is not a multiple of four
  7. * E112: expected an indented block
  8. * E113: unexpected indentation
  9. * E114: indentation is not a multiple of four (comment)
  10. * E115: expected an indented block (comment)
  11. * E116: unexpected indentation (comment)
  12. * E121: continuation line under-indented for hanging indent
  13. * E122: continuation line missing indentation or outdented
  14. * E123: closing bracket does not match indentation of opening bracket's line
  15. * E124: closing bracket does not match visual indentation
  16. * E125: continuation line with same indent as next logical line
  17. * E126: continuation line over-indented for hanging indent
  18. * E127: continuation line over-indented for visual indent
  19. * E128: continuation line under-indented for visual indent
  20. * E129: visually indented line with same indent as next logical line
  21. * E131: continuation line unaligned for hanging indent
  22. * E133: closing bracket is missing indentation
  23. ### Whitespace
  24. * E201: whitespace after '('
  25. * E202: whitespace before ')'
  26. * E203: whitespace before ':'
  27. * E211: whitespace before '('
  28. * E221: multiple spaces before operator
  29. * E222: multiple spaces after operator
  30. * E223: tab before operator
  31. * E224: tab after operator
  32. * E225: missing whitespace around operator
  33. * E226: missing whitespace around arithmetic operator
  34. * E227: missing whitespace around bitwise or shift operator
  35. * E228: missing whitespace around modulo operator
  36. * E231: missing whitespace after ',', ';', or ':'
  37. * E241: multiple spaces after ','
  38. * E242: tab after ','
  39. * E251: unexpected spaces around keyword / parameter equals
  40. * E261: at least two spaces before inline comment
  41. * E262: inline comment should start with '# '
  42. * E265: block comment should start with '# '
  43. * E266: too many leading '#' for block comment
  44. * E271: multiple spaces after keyword
  45. * E272: multiple spaces before keyword
  46. * E273: tab after keyword
  47. * E274: tab before keyword
  48. * E275: missing whitespace after keyword
  49. ### Blank line
  50. * E301: expected 1 blank line, found 0
  51. * E302: expected 2 blank lines, found 0
  52. * E303: too many blank lines (3)
  53. * E304: blank lines found after function decorator
  54. * E305: expected 2 blank lines after end of function or class
  55. * E306: expected 1 blank line before a nested definition
  56. ### Import
  57. * E401: multiple imports on one line
  58. * E402: module level import not at top of file
  59. ### Line length
  60. * E501: line too long (82 > 79 characters)
  61. * E502: the backslash is redundant between brackets
  62. ### Statement
  63. * E701: multiple statements on one line (colon)
  64. * E702: multiple statements on one line (semicolon)
  65. * E703: statement ends with a semicolon
  66. * E704: multiple statements on one line (def)
  67. * E711: comparison to None should be 'if cond is None:'
  68. * E712: comparison to True should be 'if cond is True:' or 'if cond:'
  69. * E713: test for membership should be 'not in'
  70. * E714: test for object identity should be 'is not'
  71. * E721: do not compare types, use 'isinstance()'
  72. * E722: do not use bare except, specify exception instead
  73. * E731: do not assign a lambda expression, use a def
  74. * E741: do not use variables named 'l', 'O', or 'I'
  75. * E742: do not define classes named 'l', 'O', or 'I'
  76. * E743: do not define functions named 'l', 'O', or 'I'
  77. ### Runtime
  78. * E901: SyntaxError or IndentationError
  79. * E902: IOError
  80. ### Indentation warning
  81. * W191: indentation contains tabs
  82. ### Whitespace warning
  83. * W291: trailing whitespace
  84. * W292: no newline at end of file
  85. * W293: blank line contains whitespace
  86. ### Blank line warning
  87. * W391: blank line at end of file
  88. ### Line break warning
  89. * W503: line break before binary operator
  90. * W504: line break after binary operator
  91. * W505: doc line too long (82 > 79 characters)
  92. ### Deprecation warning
  93. * W601: .has_key() is deprecated, use 'in'
  94. * W602: deprecated form of raising exception
  95. * W603: '<>' is deprecated, use '!='
  96. * W604: backticks are deprecated, use 'repr()'
  97. * W605: invalid escape sequence '\x'
  98. * W606: 'async' and 'await' are reserved keywords starting with Python 3.7
  99.  
  100. ## pyflakes / flake8
  101. * F401: `module` imported but unused
  102. * F402: import `module` from line `N` shadowed by loop variable
  103. * F403: 'from `module` import \*' used; unable to detect undefined names
  104. * F404: future import(s) `name` after other statements
  105. * F405: `name` may be undefined, or defined from star imports: `module`
  106. * F406: 'from `module` import \*' only allowed at module level
  107. * F407: an undefined `__future__` feature name was imported
  108. * F601: dictionary key `name` repeated with different values
  109. * F602: dictionary key variable `name` repeated with different values
  110. * F621: too many expressions in an assignment with star-unpacking
  111. * F622: two or more starred expressions in an assignment `(a, *b, *c = d)`
  112. * F631: assertion test is a tuple, which are always `True`
  113. * F701: a `break` statement outside of a `while` or `for` loop
  114. * F702: a `continue` statement outside of a `while` or `for` loop
  115. * F703: a `continue` statement in a `finally` block in a loop
  116. * F704: a `yield` or `yield from` statement outside of a function
  117. * F705: a `return` statement with arguments inside a generator
  118. * F706: a `return` statement outside of a function/method
  119. * F707: an `except:` block as not the last exception handler
  120. * F721: doctest syntax error
  121. * F722: syntax error in forward type annotation
  122. * F811: redefinition of unused `name` from line `N`
  123. * F812: list comprehension redefines `name` from line `N`
  124. * F821: undefined name `name`
  125. * F822: undefined name `name` in `__all__`
  126. * F823: local variable `name` ... referenced before assignment
  127. * F831: duplicate argument `name` in function definition
  128. * F841: local variable `name` is assigned to but never used
  129. * F901: `raise NotImplemented` should be `raise NotImplementedError`
  130.  
  131. ## mccabe
  132. * C901: Function is too complex
  133.  
  134. ## pep8-naming
  135. * N801: class names should use CapWords convention
  136. * N802: function name should be lowercase
  137. * N803: argument name should be lowercase
  138. * N804: first argument of a classmethod should be named 'cls'
  139. * N805: first argument of a method should be named 'self'
  140. * N806: variable in function should be lowercase
  141. * N807: function name should not start or end with '__'
  142. * N811: constant imported as non constant
  143. * N812: lowercase imported as non lowercase
  144. * N813: camelcase imported as lowercase
  145. * N814: camelcase imported as constant
  146. * N815: mixedCase variable in class scope
  147. * N816: mixedCase variable in global scope
  148.  
  149. ## flake8-docstrings (pydocstyle)
  150. ### Missing Docstrings
  151. * D100: Missing docstring in public module
  152. * D101: Missing docstring in public class
  153. * D102: Missing docstring in public method
  154. * D103: Missing docstring in public function
  155. * D104: Missing docstring in public package
  156. * D105: Missing docstring in magic method
  157. * D106: Missing docstring in public nested class
  158. * D107: Missing docstring in __init__
  159. ### Whitespace Issues
  160. * D200: One-line docstring should fit on one line with quotes
  161. * D201: No blank lines allowed before function docstring
  162. * D202: No blank lines allowed after function docstring
  163. * D203: 1 blank line required before class docstring
  164. * D204: 1 blank line required after class docstring
  165. * D205: 1 blank line required between summary line and description
  166. * D206: Docstring should be indented with spaces, not tabs
  167. * D207: Docstring is under-indented
  168. * D208: Docstring is over-indented
  169. * D209: Multi-line docstring closing quotes should be on a separate line
  170. * D210: No whitespaces allowed surrounding docstring text
  171. * D211: No blank lines allowed before class docstring
  172. * D212: Multi-line docstring summary should start at the first line
  173. * D213: Multi-line docstring summary should start at the second line
  174. * D214: Section is over-indented
  175. * D215: Section underline is over-indented
  176. ### Quotes Issues
  177. * D300: Use """triple double quotes"""
  178. * D301: Use r""" if any backslashes in a docstring
  179. * D302: Use u""" for Unicode docstrings
  180. ### Docstring Content Issues
  181. * D400: First line should end with a period
  182. * D401: First line should be in imperative mood
  183. * D401: First line should be in imperative mood; try rephrasing
  184. * D402: First line should not be the function's "signature"
  185. * D403: First word of the first line should be properly capitalized
  186. * D404: First word of the docstring should not be This
  187. * D405: Section name should be properly capitalized
  188. * D406: Section name should end with a newline
  189. * D407: Missing dashed underline after section
  190. * D408: Section underline should be in the line following the section's name
  191. * D409: Section underline should match the length of its name
  192. * D410: Missing blank line after section
  193. * D411: Missing blank line before section
  194. * D412: No blank lines allowed between a section header and its content
  195. * D413: Missing blank line after last section
  196. * D414: Section has no content
  197.  
  198. ## flake8-import-order
  199. * I100: Your import statements are in the wrong order.
  200. * I101: The names in your from import are in the wrong order.
  201. * I201: Missing newline between import groups.
  202. * I202: Additional newline in a group of imports.
  203.  
  204. ## flake8-quotes
  205. * Q000: Remove bad quotes
  206. * Q001: Remove bad quotes from multiline string
  207. * Q002: Remove bad quotes from docstring
Add Comment
Please, Sign In to add comment