Skip to content

Commit

Permalink
two spaces before inline comment
Browse files Browse the repository at this point in the history
  • Loading branch information
adeebshihadeh committed May 31, 2020
1 parent 73685b6 commit 5d33ec0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion can/can_define.py
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions can/dbc.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def __init__(self, fn):

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

Expand Down Expand Up @@ -94,7 +94,7 @@ def __init__(self, fn):
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)

Expand Down
5 changes: 3 additions & 2 deletions can/process_dbc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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_")):
Expand Down

0 comments on commit 5d33ec0

Please sign in to comment.