diff --git a/client-cli/pvc/cli/cli.py b/client-cli/pvc/cli/cli.py index a117955b..d26e044c 100644 --- a/client-cli/pvc/cli/cli.py +++ b/client-cli/pvc/cli/cli.py @@ -671,9 +671,9 @@ def cli_cluster_maintenance_off(): @format_opt( { "pretty": cli_cluster_task_format_pretty, - "raw": lambda d: "\n".join([t["id"] for t in d]) - if isinstance(d, list) - else d["state"], + "raw": lambda d: ( + "\n".join([t["id"] for t in d]) if isinstance(d, list) else d["state"] + ), "json": lambda d: jdumps(d), "json-pretty": lambda d: jdumps(d, indent=2), } diff --git a/client-cli/pvc/cli/formatters.py b/client-cli/pvc/cli/formatters.py index 7b16d4e4..b4ac38c2 100644 --- a/client-cli/pvc/cli/formatters.py +++ b/client-cli/pvc/cli/formatters.py @@ -580,9 +580,11 @@ def cli_cluster_fault_list_format_long(CLI_CONFIG, fault_data): fault_id=fault["id"], fault_status=fault["status"].title(), fault_health_delta=f"-{fault['health_delta']}%", - fault_acknowledged_at=fault["acknowledged_at"] - if fault["acknowledged_at"] != "" - else "N/A", + fault_acknowledged_at=( + fault["acknowledged_at"] + if fault["acknowledged_at"] != "" + else "N/A" + ), fault_last_reported=fault["last_reported"], fault_first_reported=fault["first_reported"], ) diff --git a/client-cli/pvc/lib/vm.py b/client-cli/pvc/lib/vm.py index def035f7..2b58ad12 100644 --- a/client-cli/pvc/lib/vm.py +++ b/client-cli/pvc/lib/vm.py @@ -1765,9 +1765,9 @@ def format_info(config, domain_information, long_output): tags_name=tag["name"], tags_type=tag["type"], tags_protected=str(tag["protected"]), - tags_protected_colour=ansiprint.green() - if tag["protected"] - else ansiprint.blue(), + tags_protected_colour=( + ansiprint.green() if tag["protected"] else ansiprint.blue() + ), end=ansiprint.end(), ) ) diff --git a/daemon-common/ceph.py b/daemon-common/ceph.py index a12acd5c..3609fa54 100644 --- a/daemon-common/ceph.py +++ b/daemon-common/ceph.py @@ -320,7 +320,11 @@ def get_list_osd(zkhandler, limit=None, is_fuzzy=True): # def getPoolInformation(zkhandler, pool): # Parse the stats data - (pool_stats_raw, tier, pgs,) = zkhandler.read_many( + ( + pool_stats_raw, + tier, + pgs, + ) = zkhandler.read_many( [ ("pool.stats", pool), ("pool.tier", pool), diff --git a/daemon-common/config.py b/daemon-common/config.py index 352a7999..5e381383 100644 --- a/daemon-common/config.py +++ b/daemon-common/config.py @@ -244,9 +244,9 @@ def get_parsed_configuration(config_file): ] ][0] - config_cluster_networks_specific[ - f"{network_type}_dev_ip" - ] = f"{list(network.hosts())[address_id]}/{network.prefixlen}" + config_cluster_networks_specific[f"{network_type}_dev_ip"] = ( + f"{list(network.hosts())[address_id]}/{network.prefixlen}" + ) config = {**config, **config_cluster_networks_specific} diff --git a/node-daemon/pvcnoded/objects/NetstatsInstance.py b/node-daemon/pvcnoded/objects/NetstatsInstance.py index 7b972e3a..1be76701 100644 --- a/node-daemon/pvcnoded/objects/NetstatsInstance.py +++ b/node-daemon/pvcnoded/objects/NetstatsInstance.py @@ -231,7 +231,7 @@ class NetstatsInstance(object): # Get a list of all active interfaces net_root_path = "/sys/class/net" all_ifaces = list() - for (_, dirnames, _) in walk(net_root_path): + for _, dirnames, _ in walk(net_root_path): all_ifaces.extend(dirnames) all_ifaces.sort()