Update hacking version

Use latest release 1.1.0 and compatible changes w.r.t pep8

Change-Id: I45befc03377d96c27db8b1d8d78dd7b5bec5ec14
This commit is contained in:
jacky06 2019-01-04 23:23:26 +08:00
parent 4c3e4da63b
commit 25415b0e46
6 changed files with 11 additions and 6 deletions

View File

@ -105,8 +105,7 @@ def _ignore_if(key, value):
return True
if not isinstance(value, six.string_types):
return True
if (key == 'type' and
not value.endswith(('.yaml', '.template'))):
if (key == 'type' and not value.endswith(('.yaml', '.template'))):
return True
return False

View File

@ -56,7 +56,7 @@ ADD_SCSS_FILES = [
'horizon/lib/bootstrap_scss/scss/_bootstrap.scss',
'horizon/lib/font_awesome/scss/font-awesome.scss',
'%s/hotgen-main.scss' % CSS_BASE
]
]
HEAT_DASHBOARD_ROOT = heat_dashboard.__path__[0]

View File

@ -30,7 +30,7 @@ flake8==2.5.5
flake8-import-order==0.12
futurist==1.2.0
greenlet==0.4.10
hacking==0.12.0
hacking==1.1.0
horizon==14.0.0.0b3
idna==2.6
iso8601==0.1.11

View File

@ -7,7 +7,7 @@
# be installed in a specific order.
#
# Hacking should appear first in case something else depends on pep8
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
hacking>=1.1.0,<1.2.0 # Apache-2.0
#
coverage!=4.4,>=4.0 # Apache-2.0
doc8>=0.6.0 # Apache-2.0

View File

@ -79,6 +79,12 @@ local-check-factory = horizon.hacking.checks.factory
[flake8]
exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,panel_template,dash_template,local_settings.py,*/local/*,*/test/test_plugins/*,.ropeproject,node_modules,.tmp
# F405 TEMPLATES may be undefined, or defined from star imports
# (because it is not easy to avoid this in openstack_dashboard.test.settings)
# W504 line break after binary operator
# (W503 and W504 are incompatible and we need to choose one of them.
# Existing codes follows W503, so we disable W504.)
ignore = F405,W504
max-complexity = 20
import-order-style = pep8