bump pycodestyle to 2.6.0

Fixes E225, E741 failures

Change-Id: I0cb196012a35097709bd421361e0721e71e8c307
This commit is contained in:
Eric Harney 2020-06-08 17:51:57 -04:00
parent fde116dfc2
commit 969d65945e
12 changed files with 17 additions and 17 deletions

View File

@ -213,7 +213,7 @@ class ServiceController(wsgi.Controller):
log_req)
result.append({'host': service.host,
'binary': service.binary,
'levels': {l.prefix: l.level for l in levels}})
'levels': {le.prefix: le.level for le in levels}})
return {'log_levels': result}

View File

@ -2676,7 +2676,7 @@ port_speed!N/A
if peer_sys not in self._partnership_list:
return self._errors['CMMVC5753E']
partner_state = ('fully_configured' if 'start'in kwargs
partner_state = ('fully_configured' if 'start' in kwargs
else 'fully_configured_stopped')
self._partnership_list[peer_sys]['partnership'] = partner_state
return('', '')

View File

@ -2168,7 +2168,7 @@ port_speed!N/A
if peer_sys not in self._partnership_list:
return self._errors['CMMVC5753E']
partner_state = ('fully_configured' if 'start'in kwargs
partner_state = ('fully_configured' if 'start' in kwargs
else 'fully_configured_stopped')
self._partnership_list[peer_sys]['partnership'] = partner_state
return('', '')

View File

@ -1852,7 +1852,7 @@ class SolidFireVolumeTestCase(test.TestCase):
def _fake_issue_api_req(method, params, version=0):
if 'ListActiveVolumes' in method:
return {'result': {'volumes': sf_vols}}
if 'ListSnapshots'in method:
if 'ListSnapshots' in method:
return {'result': {'snapshots': sf_snaps}}
with mock.patch.object(sfv, '_issue_api_request',

View File

@ -545,7 +545,7 @@ class Client(object):
self.vnx.remove_hba(initiator_uid)
def update_consistencygroup(self, cg, lun_ids_to_add, lun_ids_to_remove):
lun_ids_in_cg = (set([l.lun_id for l in cg.lun_list]) if cg.lun_list
lun_ids_in_cg = (set([lu.lun_id for lu in cg.lun_list]) if cg.lun_list
else set())
# lun_ids_to_add and lun_ids_to_remove never overlap.

View File

@ -5074,7 +5074,7 @@ class StorwizeSVCCommonDriver(san.SanDriver,
{'resp_len': len(resp),
'mirror_pool': opts['mirror_pool']})
raise exception.ManageExistingVolumeTypeMismatch(reason=msg)
if (opts['mirror_pool']and opts['mirror_pool'] !=
if (opts['mirror_pool'] and opts['mirror_pool'] !=
copies['secondary']['mdisk_grp_name']):
msg = (_("Failed to manage existing volume due to mirror pool "
"mismatch. The secondary pool of the volume to be "

View File

@ -520,10 +520,10 @@ class KaminarioCinderDriver(cinder.volume.driver.ISCSIDriver):
def _is_user_snap_sync_finished(self):
# waiting for user snapshot to be synced
while len(self.snap_updates) > 0:
for l in self.snap_updates:
sess = l.get('tgt_ssn')
gno = l.get('gno')
stime = l.get('stime')
for update in self.snap_updates:
sess = update.get('tgt_ssn')
gno = update.get('gno')
stime = update.get('stime')
sess.refresh()
if (sess.generation_number == gno and
sess.current_snapshot_progress == 100
@ -535,7 +535,7 @@ class KaminarioCinderDriver(cinder.volume.driver.ISCSIDriver):
self.snap_updates.append({'tgt_ssn': sess,
'gno': gen_no,
'stime': time.time()})
self.snap_updates.remove(l)
self.snap_updates.remove(update)
eventlet.sleep(1)
@utils.trace

View File

@ -555,7 +555,7 @@ class DataMotionMixin(object):
given replication target.
"""
filtered_mirrors = [x for x in mirrors
if x.get('destination-volume')in flexvols]
if x.get('destination-volume') in flexvols]
sorted_mirrors = sorted(filtered_mirrors,
key=lambda x: int(x.get('lag-time')),
reverse=True)

View File

@ -657,8 +657,8 @@ class QuobyteDriver(remotefs_drv.RemoteFSSnapDriverDistributed):
"""Mount Quobyte volume to mount path."""
mounted = False
with QuobyteDriver.read_proc_mount() as proc_mount:
for l in proc_mount:
if l.split()[1] == mount_path:
for line in proc_mount:
if line.split()[1] == mount_path:
mounted = True
break

View File

@ -1333,7 +1333,7 @@ class SolidFireDriver(san.SanISCSIDriver):
def _retrieve_qos_setting(self, volume, extended_size=0):
qos = {}
if (self.configuration.sf_allow_tenant_qos and
volume.get('volume_metadata')is not None):
volume.get('volume_metadata') is not None):
qos = self._set_qos_presets(volume)
ctxt = context.get_admin_context()

View File

@ -97,7 +97,7 @@ psycopg2==2.7
pyasn1-modules==0.2.1
pyasn1==0.4.2
pycadf==2.7.0
pycodestyle==2.5.0
pycodestyle==2.6.0
pycparser==2.19
pyflakes==0.8.1
Pygments==2.2.0

View File

@ -12,7 +12,7 @@ coverage!=4.4,>=4.1 # Apache-2.0
ddt>=1.2.1 # MIT
fixtures>=3.0.0 # Apache-2.0/BSD
oslotest>=3.2.0 # Apache-2.0
pycodestyle==2.5.0 # MIT License
pycodestyle==2.6.0 # MIT License
PyMySQL>=0.7.6 # MIT License
psycopg2>=2.7 # LGPL/ZPL
SQLAlchemy-Utils>=0.36.1 # BSD License