|
@@ -1,24 +1,19 @@
|
|
|
[flake8]
|
|
|
ignore =
|
|
|
- E262, # inline comment should start with '# '
|
|
|
- E265, # block comment should start with '# '
|
|
|
- E266, # too many leading '#' for block comment
|
|
|
- E402, # module level import not at top of file
|
|
|
- E502, # the backslash is redundant between brackets
|
|
|
E711, # comparison to None should be 'if cond is None:'
|
|
|
E712, # comparison to True should be 'if cond is True:' or 'if cond:'
|
|
|
- E721, # do not compare types, use 'isinstance()'
|
|
|
E722, # do not use bare 'except'
|
|
|
- E731, # do not assign a lambda expression, use a def
|
|
|
E741, # ambiguous variable name 'l'
|
|
|
F401, # '.reader.BandReferenceReader' imported but unused
|
|
|
F403, # 'from ctypes import *' used; unable to detect undefined names
|
|
|
F405, # 'RasterRow' may be undefined, or defined from star imports: ctypes, grass.pygrass.raster, grass.pygrass.vector
|
|
|
- F811, # redefinition of unused 'utils' from line 26
|
|
|
- F821, # undefined name '_'
|
|
|
F841, # local variable 't0' is assigned to but never used
|
|
|
- F901, # 'raise NotImplemented' should be 'raise NotImplementedError'
|
|
|
W605, # invalid escape sequence '\_'
|
|
|
+ E262, # inline comment should start with '# '
|
|
|
+ E265, # block comment should start with '# '
|
|
|
+ E266, # too many leading '#' for block comment
|
|
|
+ F821, # undefined name '_'
|
|
|
+ E502, # the backslash is redundant between brackets
|
|
|
W291, # trailing whitespace
|
|
|
W292, # no newline at end of file
|
|
|
W293, # blank line contains whitespace
|
|
@@ -57,6 +52,19 @@ ignore =
|
|
|
E305, # expected 2 blank lines after class or function definition, found 1
|
|
|
E401, # multiple imports on one line
|
|
|
|
|
|
+per-file-ignores =
|
|
|
+ # C wrappers call libgis.G_gisinit before importing other modules.
|
|
|
+ # TODO: Is this really needed?
|
|
|
+ pygrass/vector/__init__.py: E402,
|
|
|
+ pygrass/raster/__init__.py: E402,
|
|
|
+ pygrass/utils.py: E402,
|
|
|
+ # Current benchmarks/tests are changing sys.path before import.
|
|
|
+ # Possibly, a different approach should be taken there anyway.
|
|
|
+ pygrass/tests/benchmark.py: E402,
|
|
|
+ # Configuration file for Sphinx:
|
|
|
+ # Ignoring import/code mix and line length.
|
|
|
+ docs/conf.py: E402, E501
|
|
|
+
|
|
|
max-line-length = 88
|
|
|
exclude =
|
|
|
.git,
|