From e6ddc92efbcc4da74479a227e32a063065f32a8c Mon Sep 17 00:00:00 2001 From: ZhijunWei Date: Sat, 5 Jan 2019 00:42:37 +0800 Subject: [PATCH] Update hacking version Use latest release 1.1.0 and compatible changes w.r.t pep8 Change-Id: I44910cd34930799dc04166a4e57498c84210f14d --- HACKING.rst | 2 +- os_brick/initiator/linuxscsi.py | 4 ++-- os_brick/initiator/windows/fibre_channel.py | 4 ++-- test-requirements.txt | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/HACKING.rst b/HACKING.rst index 9c90504cd..ee5a96e8e 100644 --- a/HACKING.rst +++ b/HACKING.rst @@ -1,4 +1,4 @@ brick Style Commandments -=============================================== +======================== Read the OpenStack Style Commandments https://docs.openstack.org/hacking/latest/ diff --git a/os_brick/initiator/linuxscsi.py b/os_brick/initiator/linuxscsi.py index 822352529..baa1f6e12 100644 --- a/os_brick/initiator/linuxscsi.py +++ b/os_brick/initiator/linuxscsi.py @@ -455,8 +455,8 @@ class LinuxSCSI(executor.Executor): lines = out.strip() lines = lines.split("\n") lines = [line for line in lines - if not re.match(MULTIPATH_ERROR_REGEX, line) - and len(line)] + if not re.match(MULTIPATH_ERROR_REGEX, line) and + len(line)] if lines: mdev_name = lines[0].split(" ")[0] diff --git a/os_brick/initiator/windows/fibre_channel.py b/os_brick/initiator/windows/fibre_channel.py index 82e321fef..d331ac63d 100644 --- a/os_brick/initiator/windows/fibre_channel.py +++ b/os_brick/initiator/windows/fibre_channel.py @@ -140,8 +140,8 @@ class WindowsFCConnector(win_conn_base.BaseWindowsConnector): for node_name in hba_mappings: target_mappings = self._fc_utils.get_fc_target_mappings(node_name) for mapping in target_mappings: - if (mapping['port_name'] in target_wwpns - and mapping['lun'] == target_lun): + if (mapping['port_name'] in target_wwpns and + mapping['lun'] == target_lun): volume_mappings.append(mapping) return volume_mappings diff --git a/test-requirements.txt b/test-requirements.txt index 84075ce36..a5841bdb5 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 coverage!=4.4,>=4.0 # Apache-2.0 ddt>=1.0.1 # MIT reno>=2.5.0 # Apache-2.0