Skip to content

Commit

Permalink
ban cereal and msgq
Browse files Browse the repository at this point in the history
  • Loading branch information
sshane committed Aug 6, 2024
1 parent 5909bcd commit 1d3e059
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .importlinter
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
[importlinter]
root_packages =
openpilot
cereal
capnp

[importlinter:contract:1]
name = Forbid imports from openpilot.selfdrive.car to openpilot.system
type = forbidden
source_modules =
openpilot.selfdrive.car
forbidden_modules =
cereal
capnp
openpilot.common.params
openpilot.system
openpilot.body
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion selfdrive/car/vin.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit 1d3e059

Please sign in to comment.