From 61b6e87de7ed29e9d41bbfb963e845143e814378 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 27 Mar 2020 21:07:15 +0100 Subject: Update hacking for Python3 The repo is Python 3 now, so update hacking to version 3.0 which supports Python 3. Blacklist W503, W504 Fix other problems found Change-Id: Ic0391ae45b9d6d1ee5e2c1df81d85e655250a51d --- pycadf/cadftaxonomy.py | 1 + pycadf/cadftype.py | 1 + test-requirements.txt | 2 +- tox.ini | 4 +++- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pycadf/cadftaxonomy.py b/pycadf/cadftaxonomy.py index 1cebdb3..ebb7df4 100644 --- a/pycadf/cadftaxonomy.py +++ b/pycadf/cadftaxonomy.py @@ -89,6 +89,7 @@ OUTCOME_TAXONOMY = frozenset([ def is_valid_outcome(value): return value in OUTCOME_TAXONOMY + SERVICE_SECURITY = 'service/security' SERVICE_KEYMGR = 'service/security/keymanager' ACCOUNT_USER = 'service/security/account/user' diff --git a/pycadf/cadftype.py b/pycadf/cadftype.py index 80cec82..f6d34ef 100644 --- a/pycadf/cadftype.py +++ b/pycadf/cadftype.py @@ -35,6 +35,7 @@ VALID_EVENTTYPES = frozenset([ def is_valid_eventType(value): return value in VALID_EVENTTYPES + # valid cadf:Event record "Reporter" roles REPORTER_ROLE_OBSERVER = 'observer' REPORTER_ROLE_MODIFIER = 'modifier' diff --git a/test-requirements.txt b/test-requirements.txt index 84f3c75..bf35289 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,7 +2,7 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. # Hacking already pins down pep8, pyflakes and flake8 -hacking<0.11,>=0.10.0 +hacking>=3.0,<3.1.0 # Apache-2.0 flake8-docstrings==0.2.1.post1 # MIT coverage!=4.4,>=4.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index 7f2ef4f..efc0a81 100644 --- a/tox.ini +++ b/tox.ini @@ -54,7 +54,9 @@ show-source = True # D208: Docstring is over-indented # D400: First line should end with a period # D401: First line should be in imperative mood -ignore = H405,D100,D101,D102,D103,D104,D105,D200,D202,D203,D204,D205,D208,D400,D401 +# W503 line break before binary operator +# W504 line break after binary operator +ignore = H405,D100,D101,D102,D103,D104,D105,D200,D202,D203,D204,D205,D208,D400,D401,W503,W504 exclude = .tox,dist,doc,*.egg,build [testenv:lower-constraints] -- cgit v1.2.1