From 9dd2a24ce978750772977435e632642700866ab6 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Sat, 7 Nov 2020 14:50:57 -0500 Subject: [PATCH] Lint: E226 missing whitespace around arithmetic operator --- client-cli/cli_lib/ceph.py | 16 ++++++++-------- client-cli/cli_lib/common.py | 16 ++++++++-------- client-cli/cli_lib/vm.py | 8 ++++---- daemon-common/ceph.py | 16 ++++++++-------- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/client-cli/cli_lib/ceph.py b/client-cli/cli_lib/ceph.py index 69081212..ede9ade1 100644 --- a/client-cli/cli_lib/ceph.py +++ b/client-cli/cli_lib/ceph.py @@ -36,20 +36,20 @@ from cli_lib.common import UploadProgressBar, call_api byte_unit_matrix = { 'B': 1, 'K': 1024, - 'M': 1024*1024, - 'G': 1024*1024*1024, - 'T': 1024*1024*1024*1024, - 'P': 1024*1024*1024*1024*1024 + 'M': 1024 * 1024, + 'G': 1024 * 1024 * 1024, + 'T': 1024 * 1024 * 1024 * 1024, + 'P': 1024 * 1024 * 1024 * 1024 * 1024 } # Matrix of human-to-metric values ops_unit_matrix = { '': 1, 'K': 1000, - 'M': 1000*1000, - 'G': 1000*1000*1000, - 'T': 1000*1000*1000*1000, - 'P': 1000*1000*1000*1000*1000 + 'M': 1000 * 1000, + 'G': 1000 * 1000 * 1000, + 'T': 1000 * 1000 * 1000 * 1000, + 'P': 1000 * 1000 * 1000 * 1000 * 1000 } diff --git a/client-cli/cli_lib/common.py b/client-cli/cli_lib/common.py index 81de60a0..f8634a58 100644 --- a/client-cli/cli_lib/common.py +++ b/client-cli/cli_lib/common.py @@ -32,10 +32,10 @@ def format_bytes(size_bytes): byte_unit_matrix = { 'B': 1, 'K': 1024, - 'M': 1024*1024, - 'G': 1024*1024*1024, - 'T': 1024*1024*1024*1024, - 'P': 1024*1024*1024*1024*1024 + 'M': 1024 * 1024, + 'G': 1024 * 1024 * 1024, + 'T': 1024 * 1024 * 1024 * 1024, + 'P': 1024 * 1024 * 1024 * 1024 * 1024 } human_bytes = '0B' for unit in sorted(byte_unit_matrix, key=byte_unit_matrix.get): @@ -50,10 +50,10 @@ def format_metric(integer): integer_unit_matrix = { '': 1, 'K': 1000, - 'M': 1000*1000, - 'B': 1000*1000*1000, - 'T': 1000*1000*1000*1000, - 'Q': 1000*1000*1000*1000*1000 + 'M': 1000 * 1000, + 'B': 1000 * 1000 * 1000, + 'T': 1000 * 1000 * 1000 * 1000, + 'Q': 1000 * 1000 * 1000 * 1000 * 1000 } human_integer = '0' for unit in sorted(integer_unit_matrix, key=integer_unit_matrix.get): diff --git a/client-cli/cli_lib/vm.py b/client-cli/cli_lib/vm.py index 95683daa..7c61f692 100644 --- a/client-cli/cli_lib/vm.py +++ b/client-cli/cli_lib/vm.py @@ -366,10 +366,10 @@ def format_info(config, domain_information, long_output): format_metric(domain_information['memory_stats'].get('swap_in')), format_metric(domain_information['memory_stats'].get('swap_out')), '/'.join([format_metric(domain_information['memory_stats'].get('major_fault')), format_metric(domain_information['memory_stats'].get('minor_fault'))]), - format_bytes(domain_information['memory_stats'].get('available')*1024), - format_bytes(domain_information['memory_stats'].get('usable')*1024), - format_bytes(domain_information['memory_stats'].get('unused')*1024), - format_bytes(domain_information['memory_stats'].get('rss')*1024) + format_bytes(domain_information['memory_stats'].get('available') * 1024), + format_bytes(domain_information['memory_stats'].get('usable') * 1024), + format_bytes(domain_information['memory_stats'].get('unused') * 1024), + format_bytes(domain_information['memory_stats'].get('rss') * 1024) )) ainformation.append('') ainformation.append('{0}vCPU stats:{1} {2}CPU time (ns) User time (ns) System time (ns){3}'.format(ansiprint.purple(), ansiprint.end(), ansiprint.bold(), ansiprint.end())) diff --git a/daemon-common/ceph.py b/daemon-common/ceph.py index 74b7ccfb..aab08d3c 100644 --- a/daemon-common/ceph.py +++ b/daemon-common/ceph.py @@ -82,20 +82,20 @@ def verifyOSDBlock(zk_conn, node, device): byte_unit_matrix = { 'B': 1, 'K': 1024, - 'M': 1024*1024, - 'G': 1024*1024*1024, - 'T': 1024*1024*1024*1024, - 'P': 1024*1024*1024*1024*1024 + 'M': 1024 * 1024, + 'G': 1024 * 1024 * 1024, + 'T': 1024 * 1024 * 1024 * 1024, + 'P': 1024 * 1024 * 1024 * 1024 * 1024 } # Matrix of human-to-metric values ops_unit_matrix = { '': 1, 'K': 1000, - 'M': 1000*1000, - 'G': 1000*1000*1000, - 'T': 1000*1000*1000*1000, - 'P': 1000*1000*1000*1000*1000 + 'M': 1000 * 1000, + 'G': 1000 * 1000 * 1000, + 'T': 1000 * 1000 * 1000 * 1000, + 'P': 1000 * 1000 * 1000 * 1000 * 1000 }