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:
Cameron Clough
2022-09-27 20:43:05 -07:00
committed by GitHub
parent 96ed5aa581
commit 4e310b807f
8 changed files with 645 additions and 413 deletions
+2 -2
View File
@@ -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()
+2 -2
View File
@@ -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: