Skip to content

Commit 8e572e9

Browse files
committed
annotation cleanup ticket ebroecker#323
1 parent 55a4709 commit 8e572e9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/canmatrix/join.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ def ids_sharing_same_pgn(id_x, pgn_x, id_y, pgn_y):
2929

3030

3131
def join_frame_by_signal_start_bit(files): # type: (typing.List[str]) -> canmatrix.CanMatrix
32-
target_db = next(iter(canmatrix.formats.loadp(files.pop(0)).values())) # type: canmatrix.CanMatrix
32+
target_db = next(iter(canmatrix.formats.loadp(files.pop(0)).values()))
3333

3434
pgn_x, id_x = list_pgn(db=target_db)
3535

3636
for f in files:
37-
source_db = next(iter(canmatrix.formats.loadp(f).values())) # type: canmatrix.CanMatrix
37+
source_db = next(iter(canmatrix.formats.loadp(f).values()))
3838
pgn_y, id_y = list_pgn(db=source_db)
3939

4040
same_pgn = ids_sharing_same_pgn(id_x, pgn_x, id_y, pgn_y)
@@ -44,7 +44,7 @@ def join_frame_by_signal_start_bit(files): # type: (typing.List[str]) -> canmat
4444
target_fr = target_db.frame_by_id(id_a)
4545
source_fr = source_db.frame_by_id(id_b)
4646

47-
signal_to_add = [] # type: typing.List[canmatrix.Signal]
47+
signal_to_add = []
4848
for sig_t in target_fr.signals:
4949
for sig_s in source_fr.signals:
5050
# print(sig.name)
@@ -58,7 +58,7 @@ def join_frame_by_signal_start_bit(files): # type: (typing.List[str]) -> canmat
5858

5959
def rename_frame_with_id(source_db): # type: (canmatrix.CanMatrix) -> None
6060
for frameSc in source_db.frames:
61-
_, pgn, sa = frameSc.arbitration_id.j1939_tuple()
61+
_, pgn, sa = frameSc.arbitration_id.j1939_tuple
6262

6363
extension = "__{pgn:#04X}_{sa:#02X}_{sa:03d}d".format(pgn=pgn, sa=sa)
6464
new_name = frameSc.name + extension
@@ -95,7 +95,7 @@ def join_frame_for_manufacturer(db, files): # type: (canmatrix.CanMatrix, typin
9595
target_fr = db.frame_by_id(idx)
9696
source_fr = source_db.frame_by_id(idy)
9797

98-
_, pgn, sa = target_fr.arbitration_id.j1939_tuple()
98+
_, pgn, sa = target_fr.arbitration_id.j1939_tuple
9999
if sa < 128:
100100
print('less', target_fr.name)
101101
to_add = []

0 commit comments

Comments
 (0)