Re-enable new pycodestyle errors

The previous patch to update hacking
and pycodestyle turned off some new errors to
keep the patch smaller.

Fix those errors here.

Change-Id: Ib22f63e98eefb36b9b2a8be55c15271824408d5d
This commit is contained in:
Eric Harney 2019-05-23 11:47:40 -04:00
parent 830490916b
commit c35d78687e
34 changed files with 149 additions and 137 deletions

View File

@ -168,6 +168,7 @@ class Limit(object):
"resetTime": int(self.next_request or self._get_time()),
}
# "Limit" format is a dictionary with the HTTP verb, human-readable URI,
# a regular-expression to match, value and unit of measure (PER_DAY, etc.)

View File

@ -103,6 +103,7 @@ def get_session(use_slave=False, **kwargs):
def dispose_engine():
get_engine().dispose()
_DEFAULT_QUOTA_NAME = 'default'

View File

@ -221,6 +221,7 @@ class EvalBoolOrOp(object):
right = self.value[2].eval()
return left or right
_parser = None
_vars = {}

View File

@ -69,6 +69,7 @@ def service_get(context, service_id, backend_match_level=None, host=None,
'uuid': '4200b32b-0bf9-436c-86b2-0675f6ac218e'}
raise exception.ServiceNotFound(service_id=host)
# Some of the tests check that volume types are correctly validated during a
# volume manage operation. This data structure represents an existing volume
# type.

View File

@ -38,6 +38,7 @@ def generate_type(type_id, is_public):
'is_public': bool(is_public)
}
VOLUME_TYPES = {
fake.VOLUME_TYPE_ID: generate_type(fake.VOLUME_TYPE_ID, True),
fake.VOLUME_TYPE2_ID: generate_type(fake.VOLUME_TYPE2_ID, True),

View File

@ -10167,6 +10167,7 @@ class TestHPE3PARISCSIDriver(HPE3PARBaseDriver):
expected +
self.standard_logout)
VLUNS5_RET = ({'members':
[{'portPos': {'node': 0, 'slot': 8, 'cardPort': 2},
'active': True},

View File

@ -502,6 +502,7 @@ class test_volume(object):
def __getitem__(self, key):
return getattr(self, key)
test_volume = test_volume()
test_volume.id = {'vserver': 'openstack', 'name': 'vola'}
test_volume.aggr = {
@ -529,6 +530,7 @@ class test_snapshot(object):
def __getitem__(self, key):
return getattr(self, key)
test_snapshot = test_snapshot()
test_snapshot.id = 'fake_snap_id'
test_snapshot.name = 'snapshot-%s' % test_snapshot.id

View File

@ -56,6 +56,7 @@ class mock_vref(object):
def get(self, item, arg2 = None):
return self.__dict__[item]
f_uuid = ['262b9ce2-a71a-4fbe-830c-c20c5596caea',
'362b9ce2-a71a-4fbe-830c-c20c5596caea']

View File

@ -617,6 +617,7 @@ class DateraVolumeTestCasev21(DateraVolumeTestCasev2):
self._apiv = '2.1'
self._tenant = self.cfg.datera_tenant_id
stub_acl = {
'initiator_groups': [
'/initiator_groups/IG-8739f309-dae9-4534-aa02-5b8e9e96eefd'],

View File

@ -299,6 +299,7 @@ class RemoteFsDriverTestCase(test.TestCase):
ret_flag = drv.secure_file_operations_enabled()
self.assertFalse(ret_flag)
# NFS configuration scenarios
NFS_CONFIG1 = {'max_over_subscription_ratio': 1.0,
'reserved_percentage': 0,

View File

@ -38,6 +38,7 @@ def fake_retry(exceptions, interval=1, retries=3, backoff_rate=2):
return f
return _decorator
patch_retry = mock.patch('cinder.utils.retry', fake_retry)
patch_retry.start()
sys.modules['purestorage'] = mock.Mock()

View File

@ -146,6 +146,7 @@ class DS8KConnectionPool(connectionpool.HTTPSConnectionPool):
url = 'https://' + url[12:]
return super(DS8KConnectionPool, self).urlopen(method, url, **kwargs)
if hasattr(poolmanager, 'key_fn_by_scheme'):
poolmanager.key_fn_by_scheme["httpsds8k"] = (
poolmanager.key_fn_by_scheme["https"])

View File

@ -193,8 +193,7 @@ usedevelop = False
# reason: no agreement on this being universally
# preferable for our code. Disabled to keep checking
# tools from getting in our way with regards to this.
# E117/E305 - new rules, just disabled here temporarily.
ignore = E251,E402,W503,W504,E117,E305
ignore = E251,E402,W503,W504
# H904 Delay string interpolations at logging calls.
enable-extensions = H106,H203,H904
exclude = .git,.venv,.tox,dist,tools,doc/ext,*egg,build