Fix linting errors F522/F523 unused args

This commit is contained in:
Joshua Boniface 2021-11-06 03:21:04 -04:00
parent fbfbd70461
commit 66230ce971
6 changed files with 10 additions and 16 deletions

View File

@ -1490,7 +1490,7 @@ def create_vm(
if retcode:
raise ProvisioningError(
"Failed to find binary for mkswap: {}".format(
filesystem, stderr
stderr
)
)
else:

View File

@ -980,8 +980,6 @@ def format_list_template_system(template_data):
{template_migration_method: <{template_migration_method_length}}{end_bold}".format(
bold=ansiprint.bold(),
end_bold=ansiprint.end(),
template_state_colour="",
end_colour="",
template_name_length=template_name_length,
template_id_length=template_id_length,
template_vcpu_length=template_vcpu_length,

View File

@ -320,7 +320,6 @@ def format_vm_tags(config, name, tags):
"{bold}{tags_name: <{tags_name_length}} \
{tags_type: <{tags_type_length}} \
{tags_protected: <{tags_protected_length}}{end_bold}".format(
name_length=name_length,
tags_name_length=tags_name_length,
tags_type_length=tags_type_length,
tags_protected_length=tags_protected_length,
@ -337,7 +336,6 @@ def format_vm_tags(config, name, tags):
"{bold}{tags_name: <{tags_name_length}} \
{tags_type: <{tags_type_length}} \
{tags_protected: <{tags_protected_length}}{end_bold}".format(
name_length=name_length,
tags_type_length=tags_type_length,
tags_name_length=tags_name_length,
tags_protected_length=tags_protected_length,
@ -1723,7 +1721,6 @@ def format_info(config, domain_information, long_output):
ainformation.append(
"{purple}Tags:{end} N/A".format(
purple=ansiprint.purple(),
bold=ansiprint.bold(),
end=ansiprint.end(),
)
)

View File

@ -136,7 +136,7 @@ class CephOSDInstance(object):
)
retcode, stdout, stderr = common.run_os_command(
"ceph-volume lvm prepare --bluestore {devices}".format(
osdid=osd_id, devices=dev_flags
devices=dev_flags
)
)
if retcode:
@ -150,7 +150,7 @@ class CephOSDInstance(object):
"Getting OSD FSID for ID {} on {}".format(osd_id, device), state="i"
)
retcode, stdout, stderr = common.run_os_command(
"ceph-volume lvm list {device}".format(osdid=osd_id, device=device)
"ceph-volume lvm list {device}".format(device=device)
)
for line in stdout.split("\n"):
if "osd fsid" in line:
@ -165,7 +165,7 @@ class CephOSDInstance(object):
# 4b. Activate the OSD
logger.out(
"Activating new OSD disk with ID {}".format(osd_id, device), state="i"
"Activating new OSD disk with ID {}".format(osd_id), state="i"
)
retcode, stdout, stderr = common.run_os_command(
"ceph-volume lvm activate --bluestore {osdid} {osdfsid}".format(

View File

@ -204,9 +204,7 @@ class NodeInstance(object):
# Stop any existing flush jobs
if self.flush_thread is not None:
self.logger.out(
"Waiting for previous migration to complete".format(
self.name
),
"Waiting for previous migration to complete",
state="i",
)
self.flush_stopper = True
@ -758,7 +756,7 @@ class NodeInstance(object):
for dom_uuid in fixed_domain_list:
# Allow us to cancel the operation
if self.flush_stopper:
self.logger.out("Aborting node flush".format(self.name), state="i")
self.logger.out("Aborting node flush", state="i")
self.flush_event.set()
self.flush_thread = None
self.flush_stopper = False
@ -838,7 +836,7 @@ class NodeInstance(object):
for dom_uuid in fixed_domain_list:
# Allow us to cancel the operation
if self.flush_stopper:
self.logger.out("Aborting node unflush".format(self.name), state="i")
self.logger.out("Aborting node unflush", state="i")
self.flush_event.set()
self.flush_thread = None
self.flush_stopper = False

View File

@ -1004,8 +1004,9 @@ class VMInstance(object):
):
logger.out(
"RBD lock does not belong to this host (lock owner: {}): freeing this lock would be unsafe, aborting".format(
lock["address"].split(":")[0], state="e"
)
lock["address"].split(":")[0]
),
state="e"
)
zkhandler.write(
[