Lint: E226 missing whitespace around arithmetic operator

This commit is contained in:
Joshua Boniface 2020-11-07 14:50:57 -05:00
parent 8cea77e4d8
commit 9dd2a24ce9
4 changed files with 28 additions and 28 deletions

View File

@ -36,20 +36,20 @@ from cli_lib.common import UploadProgressBar, call_api
byte_unit_matrix = { byte_unit_matrix = {
'B': 1, 'B': 1,
'K': 1024, 'K': 1024,
'M': 1024*1024, 'M': 1024 * 1024,
'G': 1024*1024*1024, 'G': 1024 * 1024 * 1024,
'T': 1024*1024*1024*1024, 'T': 1024 * 1024 * 1024 * 1024,
'P': 1024*1024*1024*1024*1024 'P': 1024 * 1024 * 1024 * 1024 * 1024
} }
# Matrix of human-to-metric values # Matrix of human-to-metric values
ops_unit_matrix = { ops_unit_matrix = {
'': 1, '': 1,
'K': 1000, 'K': 1000,
'M': 1000*1000, 'M': 1000 * 1000,
'G': 1000*1000*1000, 'G': 1000 * 1000 * 1000,
'T': 1000*1000*1000*1000, 'T': 1000 * 1000 * 1000 * 1000,
'P': 1000*1000*1000*1000*1000 'P': 1000 * 1000 * 1000 * 1000 * 1000
} }

View File

@ -32,10 +32,10 @@ def format_bytes(size_bytes):
byte_unit_matrix = { byte_unit_matrix = {
'B': 1, 'B': 1,
'K': 1024, 'K': 1024,
'M': 1024*1024, 'M': 1024 * 1024,
'G': 1024*1024*1024, 'G': 1024 * 1024 * 1024,
'T': 1024*1024*1024*1024, 'T': 1024 * 1024 * 1024 * 1024,
'P': 1024*1024*1024*1024*1024 'P': 1024 * 1024 * 1024 * 1024 * 1024
} }
human_bytes = '0B' human_bytes = '0B'
for unit in sorted(byte_unit_matrix, key=byte_unit_matrix.get): for unit in sorted(byte_unit_matrix, key=byte_unit_matrix.get):
@ -50,10 +50,10 @@ def format_metric(integer):
integer_unit_matrix = { integer_unit_matrix = {
'': 1, '': 1,
'K': 1000, 'K': 1000,
'M': 1000*1000, 'M': 1000 * 1000,
'B': 1000*1000*1000, 'B': 1000 * 1000 * 1000,
'T': 1000*1000*1000*1000, 'T': 1000 * 1000 * 1000 * 1000,
'Q': 1000*1000*1000*1000*1000 'Q': 1000 * 1000 * 1000 * 1000 * 1000
} }
human_integer = '0' human_integer = '0'
for unit in sorted(integer_unit_matrix, key=integer_unit_matrix.get): for unit in sorted(integer_unit_matrix, key=integer_unit_matrix.get):

View File

@ -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_in')),
format_metric(domain_information['memory_stats'].get('swap_out')), 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'))]), '/'.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('available') * 1024),
format_bytes(domain_information['memory_stats'].get('usable')*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('unused') * 1024),
format_bytes(domain_information['memory_stats'].get('rss')*1024) format_bytes(domain_information['memory_stats'].get('rss') * 1024)
)) ))
ainformation.append('') 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())) 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()))

View File

@ -82,20 +82,20 @@ def verifyOSDBlock(zk_conn, node, device):
byte_unit_matrix = { byte_unit_matrix = {
'B': 1, 'B': 1,
'K': 1024, 'K': 1024,
'M': 1024*1024, 'M': 1024 * 1024,
'G': 1024*1024*1024, 'G': 1024 * 1024 * 1024,
'T': 1024*1024*1024*1024, 'T': 1024 * 1024 * 1024 * 1024,
'P': 1024*1024*1024*1024*1024 'P': 1024 * 1024 * 1024 * 1024 * 1024
} }
# Matrix of human-to-metric values # Matrix of human-to-metric values
ops_unit_matrix = { ops_unit_matrix = {
'': 1, '': 1,
'K': 1000, 'K': 1000,
'M': 1000*1000, 'M': 1000 * 1000,
'G': 1000*1000*1000, 'G': 1000 * 1000 * 1000,
'T': 1000*1000*1000*1000, 'T': 1000 * 1000 * 1000 * 1000,
'P': 1000*1000*1000*1000*1000 'P': 1000 * 1000 * 1000 * 1000 * 1000
} }