mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-06 00:36:32 +08:00
configure mypy outside of pre-commit environment (#25892)
* add mypy config matching precommit * use local mypy, add files to config * excludes too * fix config * pylint is sad now... did it get updated? * fix typing hints * ignore * this should be a regexp * mypy doesn't like Deque despite inheriting MutableSequence * more excludes * Revert "pylint is sad now... did it get updated?" This reverts commit 250c632f18ecb3d33ffb931e15425f9314a0964b.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import argparse
|
||||
import numpy as np
|
||||
from collections import defaultdict, deque
|
||||
from typing import DefaultDict, Deque
|
||||
from typing import DefaultDict, Deque, MutableSequence
|
||||
|
||||
from common.realtime import sec_since_boot
|
||||
import cereal.messaging as messaging
|
||||
@@ -19,7 +19,7 @@ if __name__ == "__main__":
|
||||
socket_names = args.socket
|
||||
sockets = {}
|
||||
|
||||
rcv_times: DefaultDict[str, Deque[float]] = defaultdict(lambda: deque(maxlen=100))
|
||||
rcv_times: DefaultDict[str, MutableSequence[float]] = defaultdict(lambda: deque(maxlen=100))
|
||||
valids: DefaultDict[str, Deque[bool]] = defaultdict(lambda: deque(maxlen=100))
|
||||
|
||||
t = sec_since_boot()
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
import sys
|
||||
import time
|
||||
import numpy as np
|
||||
from typing import DefaultDict, Deque
|
||||
from typing import DefaultDict, MutableSequence
|
||||
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[str, Deque[float]] = defaultdict(lambda: deque(maxlen=100))
|
||||
ts: DefaultDict[str, MutableSequence[float]] = defaultdict(lambda: deque(maxlen=100))
|
||||
|
||||
if __name__ == "__main__":
|
||||
while True:
|
||||
|
||||
Reference in New Issue
Block a user