From 5d33ec0f18d225e0841434763554d67d799c69d4 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Sun, 31 May 2020 00:56:04 -0700 Subject: [PATCH] two spaces before inline comment --- can/can_define.py | 2 +- can/dbc.py | 4 ++-- can/process_dbc.py | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/can/can_define.py b/can/can_define.py index 12c2d58..ad79432 100644 --- a/can/can_define.py +++ b/can/can_define.py @@ -1,2 +1,2 @@ -from opendbc.can.parser_pyx import CANDefine # pylint: disable=no-name-in-module, import-error +from opendbc.can.parser_pyx import CANDefine # pylint: disable=no-name-in-module, import-error assert CANDefine diff --git a/can/dbc.py b/can/dbc.py index b77027e..cc149ec 100755 --- a/can/dbc.py +++ b/can/dbc.py @@ -55,7 +55,7 @@ class dbc(): name = dat.group(2) size = int(dat.group(3)) - ids = int(dat.group(1), 0) # could be hex + ids = int(dat.group(1), 0) # could be hex if ids in self.msgs: sys.exit("Duplicate address detected %d %s" % (ids, self.name)) @@ -94,7 +94,7 @@ class dbc(): if dat is None: print("bad VAL {0}".format(l)) - ids = int(dat.group(1), 0) # could be hex + ids = int(dat.group(1), 0) # could be hex sgname = dat.group(2) defvals = dat.group(3) diff --git a/can/process_dbc.py b/can/process_dbc.py index adcfe96..4d88ed8 100755 --- a/can/process_dbc.py +++ b/can/process_dbc.py @@ -19,10 +19,11 @@ def process(in_fn, out_fn): can_dbc = dbc(in_fn) - msgs = [(address, msg_name, msg_size, sorted(msg_sigs, key=lambda s: s.name not in ("COUNTER", "CHECKSUM"))) # process counter and checksums first + # process counter and checksums first + msgs = [(address, msg_name, msg_size, sorted(msg_sigs, key=lambda s: s.name not in ("COUNTER", "CHECKSUM"))) for address, ((msg_name, msg_size), msg_sigs) in sorted(can_dbc.msgs.items()) if msg_sigs] - def_vals = {a: sorted(set(b)) for a, b in can_dbc.def_vals.items()} # remove duplicates + def_vals = {a: sorted(set(b)) for a, b in can_dbc.def_vals.items()} # remove duplicates def_vals = sorted(def_vals.items()) if can_dbc.name.startswith(("honda_", "acura_")):