Lint: E226 missing whitespace around arithmetic operator
This commit is contained in:
parent
8cea77e4d8
commit
9dd2a24ce9
|
@ -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
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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()))
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue