fix static analysis checks after mypy update

old-commit-hash: 229395e15b
commatwo_master
Adeeb Shihadeh 4 years ago
parent 6bd51543e5
commit dbc2971dba
  1. 1
      selfdrive/debug/internal/test_paramsd.py
  2. 7
      selfdrive/debug/live_cpu_and_temp.py

@ -1,5 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# pylint: skip-file # pylint: skip-file
# type: ignore
import numpy as np import numpy as np
import math import math

@ -1,9 +1,8 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import argparse import argparse
import numpy as np
from cereal.messaging import SubMaster from cereal.messaging import SubMaster
from common.numpy_fast import mean
def cputime_total(ct): def cputime_total(ct):
@ -49,7 +48,7 @@ if __name__ == "__main__":
if sm.updated['thermal']: if sm.updated['thermal']:
t = sm['thermal'] t = sm['thermal']
last_temp = np.mean(t.cpu) last_temp = mean(t.cpu)
last_mem = t.memUsedPercent last_mem = t.memUsedPercent
if sm.updated['procLog']: if sm.updated['procLog']:
@ -72,7 +71,7 @@ if __name__ == "__main__":
total_times = total_times_new[:] total_times = total_times_new[:]
busy_times = busy_times_new[:] busy_times = busy_times_new[:]
print("CPU %.2f%% - RAM: %.2f - Temp %.2f" % (100. * np.mean(cores), last_mem, last_temp)) print("CPU %.2f%% - RAM: %.2f - Temp %.2f" % (100. * mean(cores), last_mem, last_temp))
if args.cpu and prev_proclog is not None: if args.cpu and prev_proclog is not None:
procs = {} procs = {}

Loading…
Cancel
Save