summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhijunWei <wzj334965317@outlook.com>2018-12-28 22:52:17 +0800
committerZhijunWei <wzj334965317@outlook.com>2019-02-13 14:28:34 +0800
commit1803b638232ba399bfb13e5207958a3a63b92434 (patch)
tree5d57b345ea68633bf26bd70e86066cfcdab4b341
parent4eb61941f811a8ab96745a5ea07e6a4a89fe764c (diff)
downloadoslo-utils-1803b638232ba399bfb13e5207958a3a63b92434.tar.gz
Update hacking version
Use latest release 1.1.0 and compatible changes w.r.t pep8 Change-Id: Ide3a556918f341de6eafecb36ca431da40a0aed0 Closes-Bug: #1815715
-rw-r--r--HACKING.rst4
-rw-r--r--oslo_utils/reflection.py4
-rw-r--r--oslo_utils/strutils.py4
-rw-r--r--test-requirements.txt2
-rw-r--r--tox.ini3
5 files changed, 9 insertions, 8 deletions
diff --git a/HACKING.rst b/HACKING.rst
index 902191e..71dac05 100644
--- a/HACKING.rst
+++ b/HACKING.rst
@@ -1,4 +1,4 @@
oslo.utils Style Commandments
-======================================================
+=============================
-Read the OpenStack Style Commandments https://docs.openstack.org/hacking/latest/ \ No newline at end of file
+Read the OpenStack Style Commandments https://docs.openstack.org/hacking/latest/
diff --git a/oslo_utils/reflection.py b/oslo_utils/reflection.py
index acd82ca..f1801b8 100644
--- a/oslo_utils/reflection.py
+++ b/oslo_utils/reflection.py
@@ -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
diff --git a/oslo_utils/strutils.py b/oslo_utils/strutils.py
index d7b104d..1edcf5a 100644
--- a/oslo_utils/strutils.py
+++ b/oslo_utils/strutils.py
@@ -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:
diff --git a/test-requirements.txt b/test-requirements.txt
index 9354098..767c41b 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!=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
diff --git a/tox.ini b/tox.ini
index 0edd989..ec099e4 100644
--- a/tox.ini
+++ b/tox.ini
@@ -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