mypy: enable --warn-unused-ignores (#24287)

* this is the easy part to check

* Not sure what this fixes, 8aaf00c6a4

* bump laika

* works here

* cleanup

* add types-certifi

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 049b163ea0
taco
grekiki 3 years ago committed by GitHub
parent 846b8fe0bb
commit 77d6d9a083
  1. 3
      .pre-commit-config.yaml
  2. 2
      laika_repo
  3. 2
      selfdrive/debug/hyundai_enable_radar_points.py
  4. 2
      tools/lib/kbhit.py
  5. 4
      tools/replay/can_replay.py

@ -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 @@
Subproject commit e47ba47de2ad62f3c31cfdffa5aa381557a45d08
Subproject commit 226adc655e1488474468a97ab4a7705aad7e5837

@ -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)

@ -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...")

Loading…
Cancel
Save