Browse Source

Merge "Enable additional flake8 checks"

Zuul 2 months ago
parent
commit
a99e34a5e3
2 changed files with 20 additions and 2 deletions
  1. 1
    1
      test-requirements.txt
  2. 19
    1
      tox.ini

+ 1
- 1
test-requirements.txt View File

@@ -1,4 +1,4 @@
1
+hacking!=0.13.0,<0.14,>=0.12.0
1 2
 bashate >= 0.2
2 3
 PyYAML >= 3.1.0
3 4
 yamllint >= 0.5.2
4
-flake8 < 3.6.0

+ 19
- 1
tox.ini View File

@@ -41,12 +41,30 @@ commands =
41 41
   flake8
42 42
 
43 43
 [flake8]
44
+# H102  Apache 2.0 license header not found
45
+# H104  File contains nothing but comments
46
+# H105  Don't use author tags
47
+# H233  Python 3.x incompatible use of print operator
48
+# H236  Python 3.x incompatible __metaclass__
49
+# H238  old style class declaration, use new style
50
+# H301  one import per line
51
+# H306  imports not in alphabetical order
52
+# H401  docstring should not start with a space
53
+# H403  multi line docstrings should end on a new line
54
+# H404  multi line docstring should start without a leading new line
55
+# H405  multi line docstring summary not separated with an empty line
56
+# H702  Argument to ... must be a string
57
+# H903  Windows style line endings not allowed in code
44 58
 # E123, E125 skipped as they are invalid PEP-8.
45 59
 # E501 skipped because some of the code files include templates
46 60
 #      that end up quite wide
47 61
 show-source = True
48
-ignore = E123,E125,E501,H405
62
+ignore = H102,H104,H105,H233,H236,H238,H301,H306,H401,H403,H404,H405,H702,H903,E123,E125,E501
49 63
 exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,release-tag-*
64
+# TODO: H106 Don’t put vim configuration in source files (off by default).
65
+# H203 Use assertIs(Not)None to check for None (off by default).
66
+# TODO: H904 Delay string interpolations at logging calls (off by default).
67
+enable-extensions = H203
50 68
 
51 69
 [testenv:venv]
52 70
 basepython = python3

Loading…
Cancel
Save