.flake8 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. [flake8]
  2. ignore =
  3. E711, # comparison to None should be 'if cond is None:'
  4. E712, # comparison to True should be 'if cond is True:' or 'if cond:'
  5. E722, # do not use bare 'except'
  6. E741, # ambiguous variable name 'l'
  7. F401, # '.reader.BandReferenceReader' imported but unused
  8. F403, # 'from ctypes import *' used; unable to detect undefined names
  9. F405, # 'RasterRow' may be undefined, or defined from star imports: ctypes, grass.pygrass.raster, grass.pygrass.vector
  10. F841, # local variable 't0' is assigned to but never used
  11. W605, # invalid escape sequence '\_'
  12. E262, # inline comment should start with '# '
  13. E265, # block comment should start with '# '
  14. E266, # too many leading '#' for block comment
  15. F821, # undefined name '_'
  16. E502, # the backslash is redundant between brackets
  17. W291, # trailing whitespace
  18. W292, # no newline at end of file
  19. W293, # blank line contains whitespace
  20. W391, # blank line at end of file
  21. W503, # line break before binary operator
  22. W504, # line break after binary operator
  23. E117, # over-indented
  24. E121, # continuation line under-indented for hanging indent
  25. E122, # continuation line missing indentation or outdented
  26. E123, # closing bracket does not match indentation of opening bracket's line
  27. E124, # closing bracket does not match visual indentation
  28. E125, # continuation line with same indent as next logical line
  29. E126, # continuation line over-indented for hanging indent
  30. E127, # continuation line over-indented for visual indent
  31. E128, # continuation line under-indented for visual indent
  32. E129, # visually indented line with same indent as next logical line
  33. E201, # whitespace after '{'
  34. E202, # whitespace before ')'
  35. E203, # whitespace before ':'
  36. E211, # whitespace before '('
  37. E221, # multiple spaces before operator
  38. E222, # multiple spaces after operator
  39. E225, # missing whitespace around operator
  40. E226, # missing whitespace around arithmetic operator
  41. E228, # missing whitespace around modulo operator
  42. E231, # missing whitespace after ':'
  43. E241, # multiple spaces after ','
  44. E251, # unexpected spaces around keyword / parameter equals
  45. E261, # at least two spaces before inline comment
  46. E271, # multiple spaces after keyword
  47. E272, # multiple spaces before keyword
  48. E501, # line too long (183 > 150 characters)
  49. E301, # expected 1 blank line, found 0
  50. E302, # expected 2 blank lines, found 1
  51. E303, # too many blank lines (3)
  52. E305, # expected 2 blank lines after class or function definition, found 1
  53. E401, # multiple imports on one line
  54. per-file-ignores =
  55. # C wrappers call libgis.G_gisinit before importing other modules.
  56. # TODO: Is this really needed?
  57. pygrass/vector/__init__.py: E402,
  58. pygrass/raster/__init__.py: E402,
  59. pygrass/utils.py: E402,
  60. # Current benchmarks/tests are changing sys.path before import.
  61. # Possibly, a different approach should be taken there anyway.
  62. pygrass/tests/benchmark.py: E402,
  63. # Configuration file for Sphinx:
  64. # Ignoring import/code mix and line length.
  65. docs/conf.py: E402, E501
  66. max-line-length = 88
  67. exclude =
  68. .git,
  69. __pycache__,
  70. .env,
  71. .venv,
  72. env,
  73. venv,
  74. ENV,
  75. env.bak,
  76. venv.bak,
  77. ctypes,
  78. pydispatch,
  79. testsuite,