ban cereal and msgq

pull/33208/head
Shane Smiskol 9 months ago
parent 5909bcde62
commit 1d3e059cc6
  1. 13
      .importlinter
  2. 2
      selfdrive/car/vin.py

@ -1,6 +1,8 @@
[importlinter]
root_packages =
openpilot
cereal
capnp
[importlinter:contract:1]
name = Forbid imports from openpilot.selfdrive.car to openpilot.system
@ -8,6 +10,8 @@ type = forbidden
source_modules =
openpilot.selfdrive.car
forbidden_modules =
cereal
capnp
openpilot.common.params
openpilot.system
openpilot.body
@ -40,4 +44,13 @@ ignore_imports =
# these two will still live in openpilot, but require some modification
openpilot.selfdrive.car.fw_versions -> openpilot.common.params
openpilot.selfdrive.car.ecu_addrs -> openpilot.common.params
openpilot.selfdrive.car.tests.test_models -> capnp
openpilot.selfdrive.car.tests.test_car_interfaces -> cereal
openpilot.selfdrive.car.tests.test_car_interfaces -> cereal.messaging
openpilot.selfdrive.car.tests.test_car_interfaces -> openpilot.selfdrive.test.fuzzy_generation
openpilot.selfdrive.car.tests.test_models -> cereal
openpilot.selfdrive.car.tests.test_models -> cereal.messaging
openpilot.selfdrive.car.card -> cereal
openpilot.selfdrive.car.card -> cereal.messaging
openpilot.selfdrive.car.vin -> cereal.messaging
unmatched_ignore_imports_alerting = warn

@ -1,7 +1,6 @@
#!/usr/bin/env python3
import re
import cereal.messaging as messaging
from panda.python.uds import get_rx_addr_for_tx_addr, FUNCTIONAL_ADDRS
from openpilot.selfdrive.car import carlog
from openpilot.selfdrive.car.isotp_parallel_query import IsoTpParallelQuery
@ -63,6 +62,7 @@ def get_vin(logcan, sendcan, buses, timeout=0.1, retry=2, debug=False):
if __name__ == "__main__":
import argparse
import time
import cereal.messaging as messaging
parser = argparse.ArgumentParser(description='Get VIN of the car')
parser.add_argument('--debug', action='store_true')

Loading…
Cancel
Save