.github/linters: Enable flake8 W293 blank line contains whitespace (#6268)

https://www.flake8rules.com/rules/W293.html
This commit is contained in:
John Bampton 2022-04-16 01:02:52 +10:00 committed by GitHub
parent 50b2dc2789
commit cfa4f33940
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 22 additions and 22 deletions

View File

@ -16,4 +16,4 @@
# under the License.
[flake8]
select = W291
select = W291,W293

View File

@ -247,7 +247,7 @@ class TestMigrateVolumeToAnotherPool(cloudstackTestCase):
cls.storage_pool = StoragePool.update(cls.apiclient,
id=cls.storage_pool.id,
tags = ["ssd, nfs"])
if template == FAILED:
assert False, "get_template() failed to return template\

View File

@ -229,7 +229,7 @@ class TestStoragePool(cloudstackTestCase):
cls.apiclient,
name="Large"
)
cls.disk_offerings = disk_offerings[0]
cls.disk_offering_20 = disk_offering_20[0]
@ -824,7 +824,7 @@ class TestStoragePool(cloudstackTestCase):
flag = True
except spapi.ApiError as err:
flag = False
if flag is True:
raise Exception("Snapshot was not deleted")
except Exception as err:
@ -913,12 +913,12 @@ class TestStoragePool(cloudstackTestCase):
flag = True
except spapi.ApiError as err:
flag = False
if flag is True:
raise Exception("Snapshot was not deleted")
except Exception as err:
self.debug('Snapshot was deleted %s' % err)
Template.delete(template, self.apiclient, zoneid = self.zone.id)
@ -1744,7 +1744,7 @@ class TestStoragePool(cloudstackTestCase):
)
self.assertIsNotNone(self.volume, "Detach: Is none")
snapshot = Snapshot.create(
self.apiclient,
self.volume.id,
@ -2052,10 +2052,10 @@ class TestStoragePool(cloudstackTestCase):
if snapshotid:
cmd.snapshotid = snapshotid
if account:
cmd.account=account
if domainid:
cmd.domainid=domainid
return Volume(apiclient.createVolume(cmd).__dict__)
@ -2150,4 +2150,4 @@ class TestStoragePool(cloudstackTestCase):
auth = cfg['SP_AUTH_TOKEN']
return host, int(port), auth

View File

@ -480,7 +480,7 @@ class TestStoragePool(cloudstackTestCase):
self.debug('list_snapshot_response -------------------- %s' % list_snapshot_response)
self.assertIsNone(list_snapshot_response, "snapshot is already deleted")
@attr(tags=["advanced", "advancedns", "smoke"], required_hardware="true")
def test_06_remove_vcpolicy_tag_when_disk_detached(self):

View File

@ -410,16 +410,16 @@ class StorPoolHelper():
""" Get destination pool which has scope same as migrateto
and which is not in avoid set
"""
destinationPool = None
# Get Storage Pool Id to migrate to
for storagePool in pools:
if storagePool.scope == migrateto:
if storagePool.name not in poolsToavoid:
destinationPool = storagePool
break
return destinationPool
@classmethod
@ -449,7 +449,7 @@ class StorPoolHelper():
cmd.securitygroupid = id
cmd.account = account
cmd.domainid = domainid
apiclient.authorizeSecurityGroupIngress(cmd)
cmd.protocol = 'ICMP'
@ -466,7 +466,7 @@ class StorPoolHelper():
"""
This method is to migrate a VM using migrate virtual machine API
"""
vm.migrate(
apiclient,
hostid=destinationHost.id,
@ -493,7 +493,7 @@ class StorPoolHelper():
4. pools -> list of destination pools
"""
vol_pool_map = {vol.id: pool.id for vol in volumes}
cmd = migrateVirtualMachineWithVolume.migrateVirtualMachineWithVolumeCmd()
cmd.hostid = destinationHost.id
cmd.migrateto = []
@ -514,7 +514,7 @@ class StorPoolHelper():
assert isinstance(migrated_vm_response, list), "Check list virtual machines response for valid list"
assert migrated_vm_response[0].hostid == destinationHost.id, "VM did not migrate to a specified host"
for vol in volumes:
migrated_volume_response = list_volumes(
apiclient,
@ -523,9 +523,9 @@ class StorPoolHelper():
listall=True)
assert isinstance(migrated_volume_response, list), "Check list virtual machines response for valid list"
assert migrated_volume_response[0].storageid == pool.id, "Volume did not migrate to a specified pool"
assert str(migrated_volume_response[0].state).lower().eq('ready'), "Check migrated volume is in Ready state"
return migrated_vm_response[0]
@classmethod
@ -683,7 +683,7 @@ class StorPoolHelper():
cmd.diskofferingid = disk_offering.id
if size:
cmd.size = size
if maxiops:
cmd.maxiops = maxiops
if miniops:

View File

@ -322,5 +322,5 @@ class TestVmSnapshot(cloudstackTestCase):
virtualmachineid=self.virtual_machine.id,
listall=False)
self.debug('list_snapshot_response -------------------- %s' % list_snapshot_response)
self.assertIsNone(list_snapshot_response, "snapshot is already deleted")