mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-07 09:16:00 +08:00
mypy: enable --warn-unused-ignores (#24287)
* this is the easy part to check * Not sure what this fixes, https://github.com/commaai/openpilot/pull/24282/commits/8aaf00c6a41ac4c9c5e56f8a2dfed8591f153b67 * bump laika * works here * cleanup * add types-certifi Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
This commit is contained in:
@@ -21,8 +21,9 @@ repos:
|
||||
- id: mypy
|
||||
exclude: '^(pyextra/)|(cereal/)|(rednose/)|(panda/)|(laika/)|(opendbc/)|(laika_repo/)|(rednose_repo/)/'
|
||||
additional_dependencies: ['git+https://github.com/numpy/numpy-stubs', 'types-requests', 'types-atomicwrites',
|
||||
'types-pycurl']
|
||||
'types-pycurl', 'types-certifi']
|
||||
args:
|
||||
- --warn-unused-ignores
|
||||
- --warn-redundant-casts
|
||||
- --warn-unreachable
|
||||
- repo: https://github.com/PyCQA/flake8
|
||||
|
||||
+1
-1
Submodule laika_repo updated: e47ba47de2...226adc655e
@@ -74,7 +74,7 @@ if __name__ == "__main__":
|
||||
print("\nyou didn't type 'OK! (aborted)")
|
||||
sys.exit(0)
|
||||
|
||||
panda = Panda() # type: ignore
|
||||
panda = Panda()
|
||||
panda.set_safety_mode(Panda.SAFETY_ELM327)
|
||||
uds_client = UdsClient(panda, 0x7D0, bus=args.bus, debug=args.debug)
|
||||
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ class KBHit:
|
||||
self.new_term = self.old_term.copy()
|
||||
|
||||
# New terminal setting unbuffered
|
||||
self.new_term[3] &= ~(termios.ICANON | termios.ECHO) # type: ignore
|
||||
self.new_term[3] &= ~(termios.ICANON | termios.ECHO)
|
||||
termios.tcsetattr(STDIN_FD, termios.TCSAFLUSH, self.new_term)
|
||||
|
||||
# Support normal-terminal reset at exit
|
||||
|
||||
@@ -14,7 +14,7 @@ from panda import Panda
|
||||
try:
|
||||
from panda_jungle import PandaJungle # pylint: disable=import-error
|
||||
except Exception:
|
||||
PandaJungle = None # type: ignore
|
||||
PandaJungle = None
|
||||
|
||||
|
||||
def send_thread(s, flock):
|
||||
@@ -83,7 +83,7 @@ def connect():
|
||||
|
||||
if __name__ == "__main__":
|
||||
if PandaJungle is None:
|
||||
print("\33[31m", "WARNING: cannot connect to jungles. Clone the jungle library to enable support:", "\033[0m") # type: ignore
|
||||
print("\33[31m", "WARNING: cannot connect to jungles. Clone the jungle library to enable support:", "\033[0m")
|
||||
print("\033[34m", f"cd {BASEDIR} && git clone https://github.com/commaai/panda_jungle", "\033[0m")
|
||||
|
||||
print("Loading log...")
|
||||
|
||||
Reference in New Issue
Block a user