Enable Flake8 Whitespace Errors
Flake8 currently ignores a number of whitespace related errors: E201: whitespace after '[' E202: whitespace before '}' E203: whitespace before ':' E211: whitespace before '(' E221: multiple spaces before operator E222: multiple spaces after operator E225: missing whitespace around operator E226: missing whitespace around arithmetic operator E231: missing whitespace after ',' E251: unexpected spaces around keyword / parameter equals E261: at least two spaces before inline comment Enable them for more thorough testing of code Change-Id: Id03f36070b8f16694a12f4d36858680b6e00d530 Story: 2004515 Task: 30076 Signed-off-by: Eric Barrett <eric.barrett@windriver.com>
This commit is contained in:
parent
a16b3f8a19
commit
2344de88df
|
@ -217,7 +217,7 @@ def read_func():
|
|||
else:
|
||||
_delta = (c.cpu_time[_cpu_count] - c.cpu_time_last[_cpu_count])
|
||||
_delta = _delta / 1000000 / _time_delta
|
||||
cpu_occupancy.append(float((100*(_delta))/1000))
|
||||
cpu_occupancy.append(float((100 * (_delta)) / 1000))
|
||||
c.total_avg_cpu += cpu_occupancy[_cpu_count]
|
||||
if debug:
|
||||
collectd.info('%s cpu %d - count:%d [%s]' %
|
||||
|
|
|
@ -416,7 +416,7 @@ def get_timestamp(lmon_time):
|
|||
|
||||
if lmon_time:
|
||||
try:
|
||||
return(float(float(lmon_time)/1000000))
|
||||
return(float(float(lmon_time) / 1000000))
|
||||
except:
|
||||
collectd.error("%s failed to parse timestamp ;"
|
||||
" using current time" % PLUGIN)
|
||||
|
|
|
@ -268,7 +268,7 @@ def read_func():
|
|||
UPPER_HEX_IP += val
|
||||
UPPER_HEX_IP += ':'
|
||||
tmp = hex(int(port)).split('x')[-1].upper()
|
||||
for i in range(4-len(tmp)):
|
||||
for i in range(4 - len(tmp)):
|
||||
UPPER_HEX_IP += '0'
|
||||
UPPER_HEX_IP += tmp
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ show = {}
|
|||
|
||||
# Constants
|
||||
Ki = 1024
|
||||
Mi = Ki*Ki
|
||||
Mi = Ki * Ki
|
||||
|
||||
# Active worker pids
|
||||
active_pids = multiprocessing.Manager().dict()
|
||||
|
@ -605,8 +605,8 @@ def do_libvirt_domain_info(tuple_hosts):
|
|||
with suppress_stdout_stderr():
|
||||
d_vcpus = dom.vcpus()
|
||||
except Exception as e:
|
||||
d_vcpus = tuple([d_nrVirtCpu*[],
|
||||
d_nrVirtCpu*[tuple(total_cpus * [False])]])
|
||||
d_vcpus = tuple([d_nrVirtCpu * [],
|
||||
d_nrVirtCpu * [tuple(total_cpus * [False])]])
|
||||
|
||||
# Obtain cpulist of pcpus in the order of vcpus. This applies to either
|
||||
# pinned or floating vcpus, Note that the cpuinfo pcpu value can be
|
||||
|
@ -1379,7 +1379,7 @@ def print_all_tables(tenants=None,
|
|||
I.name,
|
||||
I.min_disk,
|
||||
I.min_ram,
|
||||
'%.2f' % (I.size/1024.0/1024.0),
|
||||
'%.2f' % (I.size / 1024.0 / 1024.0),
|
||||
I.status,
|
||||
I.properties,
|
||||
])
|
||||
|
|
Loading…
Reference in New Issue