remove mypy ignore from a few scripts

pull/24760/head
Adeeb Shihadeh 3 years ago
parent 8b32e1b060
commit 11b5d51da6
  1. 11
      selfdrive/debug/check_freq.py
  2. 4
      selfdrive/debug/check_lag.py
  3. 5
      selfdrive/debug/check_timings.py

@ -1,9 +1,9 @@
#!/usr/bin/env python3
# type: ignore
import argparse
import numpy as np
from collections import defaultdict, deque
from typing import DefaultDict, Deque
from common.realtime import sec_since_boot
import cereal.messaging as messaging
@ -19,8 +19,8 @@ if __name__ == "__main__":
socket_names = args.socket
sockets = {}
rcv_times = defaultdict(lambda: deque(maxlen=100))
valids = defaultdict(lambda: deque(maxlen=100))
rcv_times: DefaultDict[str, Deque[float]] = defaultdict(lambda: deque(maxlen=100))
valids: DefaultDict[str, Deque[bool]] = defaultdict(lambda: deque(maxlen=100))
t = sec_since_boot()
for name in socket_names:
@ -31,6 +31,9 @@ if __name__ == "__main__":
while True:
for socket in poller.poll(100):
msg = messaging.recv_one(socket)
if msg is None:
continue
name = msg.which()
t = sec_since_boot()

@ -1,5 +1,5 @@
#!/usr/bin/env python3
# type: ignore
from typing import Dict
import cereal.messaging as messaging
from cereal.services import service_list
@ -10,7 +10,7 @@ TO_CHECK = ['carState']
if __name__ == "__main__":
sm = messaging.SubMaster(TO_CHECK)
prev_t = {}
prev_t: Dict[str, float] = {}
while True:
sm.update()

@ -1,14 +1,15 @@
#!/usr/bin/env python3
# type: ignore
import sys
import time
import numpy as np
from typing import DefaultDict, Deque
from collections import defaultdict, deque
import cereal.messaging as messaging
socks = {s: messaging.sub_sock(s, conflate=False) for s in sys.argv[1:]}
ts = defaultdict(lambda: deque(maxlen=100))
ts: DefaultDict[str, Deque[float]] = defaultdict(lambda: deque(maxlen=100))
if __name__ == "__main__":
while True:

Loading…
Cancel
Save