Update hacking version

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

Change-Id: Ide3a556918f341de6eafecb36ca431da40a0aed0
Closes-Bug: #1815715
This commit is contained in:
ZhijunWei 2018-12-28 22:52:17 +08:00
parent 4eb61941f8
commit 1803b63823
5 changed files with 9 additions and 8 deletions

View File

@ -1,4 +1,4 @@
oslo.utils Style Commandments
======================================================
=============================
Read the OpenStack Style Commandments https://docs.openstack.org/hacking/latest/
Read the OpenStack Style Commandments https://docs.openstack.org/hacking/latest/

View File

@ -208,8 +208,8 @@ def get_callable_args(function, required_only=False):
sig = get_signature(function)
function_args = list(six.iterkeys(sig.parameters))
for param_name, p in six.iteritems(sig.parameters):
if (p.kind in (Parameter.VAR_POSITIONAL, Parameter.VAR_KEYWORD)
or (required_only and p.default is not Parameter.empty)):
if (p.kind in (Parameter.VAR_POSITIONAL, Parameter.VAR_KEYWORD) or
(required_only and p.default is not Parameter.empty)):
function_args.remove(param_name)
return function_args

View File

@ -554,8 +554,8 @@ def split_by_commas(value):
.. versionadded:: 3.17
"""
word = (pp.QuotedString(quoteChar='"', escChar='\\')
| pp.Word(pp.printables, excludeChars='",'))
word = (pp.QuotedString(quoteChar='"', escChar='\\') |
pp.Word(pp.printables, excludeChars='",'))
grammar = pp.stringStart + pp.delimitedList(word) + pp.stringEnd
try:

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,<1.2.0 # Apache-2.0
eventlet>=0.18.2,!=0.18.3,!=0.20.1,!=0.21.0,!=0.23.0 # MIT
fixtures>=3.0.0 # Apache-2.0/BSD

View File

@ -41,7 +41,8 @@ basepython = python3
commands = bandit -r oslo_utils -x tests -n5
[flake8]
ignore = E123,H405
# E731 skipped as assign a lambda expression
ignore = E123,E731,H405
show-source = True
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,__init__.py