summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl Bailey <Al.Bailey@windriver.com>2019-02-01 17:06:12 -0600
committerAl Bailey <Al.Bailey@windriver.com>2019-02-01 17:07:53 -0600
commita40bce19f9cf784bf29b4829e0b256aa941fc120 (patch)
tree4cf409e34dab73741a953e19dce57038c45a6ed8
parent26563288d1443e47ce72622a4cfd96c8933019a1 (diff)
Enable additional flake8 checks
By setting 'hacking' as the dependency, flake8 will include hacking and other checks. This is the same set used by other openstack components. This commit suppresses any of those new checks that would fail. H102 Apache 2.0 license header not found H104 File contains nothing but comments H105 Don't use author tags H233 Python 3.x incompatible use of print operator H236 Python 3.x incompatible __metaclass__ H238 old style class declaration, use new style H301 one import per line H306 imports not in alphabetical order H401 docstring should not start with a space H403 multi line docstrings should end on a new line H404 multi line docstring should start without a leading new line H405 multi line docstring summary not separated with an empty line H702 Argument to ... must be a string H903 Windows style line endings not allowed in code At a later time, additional commits will fix and un-suppress them. Story: 2004515 Task: 29304 Change-Id: I7f9e36cb605e47338dc5d33c94d1c0b09943a38a Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
Notes
Notes (review): Code-Review+2: Tao Liu <tao.liu@windriver.com> Code-Review+2: Eric MacDonald <eric.macdonald@windriver.com> Workflow+1: Eric MacDonald <eric.macdonald@windriver.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Mon, 04 Feb 2019 22:05:08 +0000 Reviewed-on: https://review.openstack.org/634511 Project: openstack/stx-fault Branch: refs/heads/master
-rw-r--r--test-requirements.txt2
-rw-r--r--tox.ini20
2 files changed, 20 insertions, 2 deletions
diff --git a/test-requirements.txt b/test-requirements.txt
index d498648..71c1c3c 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -1,4 +1,4 @@
1hacking!=0.13.0,<0.14,>=0.12.0
1bashate >= 0.2 2bashate >= 0.2
2PyYAML >= 3.1.0 3PyYAML >= 3.1.0
3yamllint >= 0.5.2 4yamllint >= 0.5.2
4flake8 < 3.6.0
diff --git a/tox.ini b/tox.ini
index bb0bba1..08b17a6 100644
--- a/tox.ini
+++ b/tox.ini
@@ -41,12 +41,30 @@ commands =
41 flake8 41 flake8
42 42
43[flake8] 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# E123, E125 skipped as they are invalid PEP-8. 58# E123, E125 skipped as they are invalid PEP-8.
45# E501 skipped because some of the code files include templates 59# E501 skipped because some of the code files include templates
46# that end up quite wide 60# that end up quite wide
47show-source = True 61show-source = True
48ignore = E123,E125,E501,H405 62ignore = H102,H104,H105,H233,H236,H238,H301,H306,H401,H403,H404,H405,H702,H903,E123,E125,E501
49exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,release-tag-* 63exclude = .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).
67enable-extensions = H203
50 68
51[testenv:venv] 69[testenv:venv]
52basepython = python3 70basepython = python3