Browse Source

Adopt hacking 1.1.0

Update hacking and other related packages to ensure better
python3 compatibility and coding style.  This will also fix
some Deprecation warning messages coming from these packages.

Had to add some new warnings to the ignore list which will
be cleaned-up in another change.

Change-Id: I286e562493b488da8fd4ec966955c320c39de703
tags/6.0.0.0rc1
Brian Haley 9 months ago
parent
commit
4885376f3c
4 changed files with 23 additions and 12 deletions
  1. +8
    -1
      .pylintrc
  2. +5
    -6
      lower-constraints.txt
  3. +4
    -2
      test-requirements.txt
  4. +6
    -3
      tox.ini

+ 8
- 1
.pylintrc View File

@@ -58,7 +58,14 @@ disable=
useless-object-inheritance,
too-many-nested-blocks,
too-many-boolean-expressions,
not-callable
not-callable,
# new for python3 version of pylint
chained-comparison,
consider-using-dict-comprehension,
consider-using-in,
consider-using-set-comprehension,
unnecessary-pass,
useless-object-inheritance


[BASIC]

+ 5
- 6
lower-constraints.txt View File

@@ -3,7 +3,7 @@ alembic==0.8.10
amqp==2.1.1
appdirs==1.4.3
asn1crypto==0.23.0
astroid==1.3.8
astroid==2.1.0
Babel==2.3.4
beautifulsoup4==4.6.0
cachetools==2.0.0
@@ -25,12 +25,12 @@ eventlet==0.18.2
extras==1.0.0
fasteners==0.7.0
fixtures==3.0.0
flake8==2.5.5
flake8==2.6.2
flake8-import-order==0.12
future==0.16.0
futurist==1.2.0
greenlet==0.4.10
hacking==0.12.0
hacking==1.1.0
httplib2==0.9.1
idna==2.6
imagesize==0.7.1
@@ -98,13 +98,12 @@ positional==1.2.1
prettytable==0.7.2
psutil==3.2.2
pycadf==1.1.0
pycodestyle==2.3.1
pycodestyle==2.4.0
pycparser==2.18
pyflakes==0.8.1
Pygments==2.2.0
pyinotify==0.9.6
pylint==1.9.3;python_version=='2.7'
pylint==2.1.1;python_version>='3.0'
pylint==2.2.0
pyOpenSSL==17.1.0
pyparsing==2.1.0
pyperclip==1.5.27

+ 4
- 2
test-requirements.txt View File

@@ -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!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
hacking>=1.1.0 # Apache-2.0

coverage!=4.4,>=4.0 # Apache-2.0
flake8-import-order==0.12 # LGPLv3
@@ -12,7 +12,9 @@ openstackdocstheme>=1.18.1 # Apache-2.0
doc8>=0.6.0 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0
os-testr>=1.0.0 # Apache-2.0
pylint==1.9.3;python_version=='2.7' # GPLv2
astroid==1.6.5;python_version<"3.0" # LGPLv2.1
astroid==2.1.0;python_version>="3.0" # LGPLv2.1
pylint==1.9.3;python_version<'3.0' # GPLv2
pylint==2.3.0;python_version>='3.0' # GPLv2
octavia-lib>=1.1.1
testresources>=2.0.0 # Apache-2.0/BSD

+ 6
- 3
tox.ini View File

@@ -1,6 +1,6 @@
[tox]
minversion = 2.0
envlist = py35,py27,pep8
envlist = py35,py27,pep8,docs
skipsdist = True

[testenv]
@@ -8,7 +8,7 @@ usedevelop = True
install_command = pip install {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning
PYTHONWARNINGS=default::DeprecationWarning,ignore::DeprecationWarning:distutils,ignore::DeprecationWarning:site
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
@@ -106,10 +106,13 @@ commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasen
extensions = .rst

[flake8]
# E117 over-indented
# E123 closing bracket does not match indentation of opening bracket’s line
# E125 continuation line does not distinguish itself from next logical line
# H205 Use assert(Greater|Less)(Equal) for comparison
# N530 direct neutron imports not allowed
ignore = E123,E125,N530
# W504 line break after binary operator
ignore = E117,E123,E125,H205,N530,W504
# H106: Don't put vim configuration in source files
# H203: Use assertIs(Not)None to check for None
# H204: Use assert(Not)Equal to check for equality

Loading…
Cancel
Save