enable flake8 E231: missing whitespace after comma

This commit is contained in:
Adeeb Shihadeh
2020-05-31 12:37:52 -07:00
parent ddcc78d2d5
commit efd5dffb1e
60 changed files with 228 additions and 228 deletions

View File

@@ -25,9 +25,9 @@ def can_printer(bus=0, max_msg=None, addr="127.0.0.1"):
if sec_since_boot() - lp > 0.1:
dd = chr(27) + "[2J"
dd += "%5.2f\n" % (sec_since_boot() - start)
for k,v in sorted(zip(msgs.keys(), map(lambda x: binascii.hexlify(x[-1]), msgs.values()))):
for k, v in sorted(zip(msgs.keys(), map(lambda x: binascii.hexlify(x[-1]), msgs.values()))):
if max_msg is None or k < max_msg:
dd += "%s(%6d) %s\n" % ("%04X(%4d)" % (k,k),len(msgs[k]), v.decode('ascii'))
dd += "%s(%6d) %s\n" % ("%04X(%4d)" % (k, k), len(msgs[k]), v.decode('ascii'))
print(dd)
lp = sec_since_boot()

View File

@@ -69,7 +69,7 @@ if __name__ == "__main__":
k = ' '.join(p.cmdline())
print('Add monitored proc:', k)
stats[k] = {'cpu_samples': defaultdict(list), 'min': defaultdict(lambda: None), 'max': defaultdict(lambda: None),
'avg': defaultdict(lambda: 0.0), 'last_cpu_times': None, 'last_sys_time':None}
'avg': defaultdict(lambda: 0.0), 'last_cpu_times': None, 'last_sys_time': None}
stats[k]['last_sys_time'] = timer()
stats[k]['last_cpu_times'] = p.cpu_times()
monitored_procs.append(p)

View File

@@ -45,7 +45,7 @@ else:
with open('/tmp/dmesg-' + timestr + '.log', 'w') as dmesg_out:
subprocess.call('dmesg', stdout=dmesg_out, shell=False)
with open("/tmp/logcat-" + timestr + '.log', 'w') as logcat_out:
subprocess.call(['logcat','-d'], stdout=logcat_out, shell=False)
subprocess.call(['logcat', '-d'], stdout=logcat_out, shell=False)
text += "Sensor pass history: " + str(data['sensor-pass']) + "\n"
text += "Sensor fail history: " + str(data['sensor-fail']) + "\n"