From 7939777a150ded194d78e927c6deda0bbf02aaf7 Mon Sep 17 00:00:00 2001 From: ZhijunWei Date: Fri, 28 Dec 2018 23:04:03 +0800 Subject: [PATCH] Update hacking version 1. Use latest release 1.1.0 and compatible changes w.r.t pep8 2. cleanup of .keys() from dict_object.keys() *in* operator Story: 2004930 Task: 29772 Change-Id: I5c41100494efee5f0d29d094ccb4d85a6f64bcec --- HACKING.rst | 2 +- lower-constraints.txt | 2 +- monascaclient/common/utils.py | 2 +- monascaclient/v2_0/__init__.py | 4 ++-- test-requirements.txt | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/HACKING.rst b/HACKING.rst index 47e9c3a..dfcf34e 100644 --- a/HACKING.rst +++ b/HACKING.rst @@ -1,4 +1,4 @@ python-monascaclient Style Commandments -=============================================== +======================================= Read the OpenStack Style Commandments http://docs.openstack.org/hacking/latest diff --git a/lower-constraints.txt b/lower-constraints.txt index da7e917..897fce1 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -19,7 +19,7 @@ flake8==2.5.5 future==0.16.0 gitdb==0.6.4 GitPython==1.0.1 -hacking==0.12.0 +hacking==1.1.0 imagesize==0.7.1 iso8601==0.1.11 Jinja2==2.10 diff --git a/monascaclient/common/utils.py b/monascaclient/common/utils.py index 5122dd2..0a99a69 100644 --- a/monascaclient/common/utils.py +++ b/monascaclient/common/utils.py @@ -78,7 +78,7 @@ def print_dict(d, formatters=None): caching=False, print_empty=False) pt.align = 'l' - for field in d.keys(): + for field in d: if field in formatters: pt.add_row([field, formatters[field](d[field])]) else: diff --git a/monascaclient/v2_0/__init__.py b/monascaclient/v2_0/__init__.py index 88e34e4..5fdf099 100644 --- a/monascaclient/v2_0/__init__.py +++ b/monascaclient/v2_0/__init__.py @@ -13,6 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -__all__ = ['Client'] - from monascaclient.v2_0.client import Client + +__all__ = ['Client'] diff --git a/test-requirements.txt b/test-requirements.txt index 66d4078..2cac5d9 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 bandit>=1.1.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0