File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ def walk(
88
88
offset += 2
89
89
90
90
91
- TBranchTrail = tuple [list [TOffset ], Optional [TArc ]]
91
+ TBranchTrail = tuple [set [TOffset ], Optional [TArc ]]
92
92
TBranchTrails = dict [TOffset , list [TBranchTrail ]]
93
93
94
94
@@ -124,10 +124,10 @@ def branch_trails(code: CodeType) -> TBranchTrails:
124
124
125
125
def walk_one_branch (start_at : TOffset ) -> TBranchTrail :
126
126
# pylint: disable=cell-var-from-loop
127
- inst_offsets : list [TOffset ] = []
127
+ inst_offsets : set [TOffset ] = set ()
128
128
to_line = None
129
129
for inst2 in iwalker .walk (start_at = start_at ):
130
- inst_offsets .append (inst2 .offset )
130
+ inst_offsets .add (inst2 .offset )
131
131
if inst2 .line_number and inst2 .line_number != from_line :
132
132
to_line = inst2 .line_number
133
133
break
@@ -139,7 +139,7 @@ def walk_one_branch(start_at: TOffset) -> TBranchTrail:
139
139
if to_line is not None :
140
140
return inst_offsets , (from_line , to_line )
141
141
else :
142
- return [] , None
142
+ return set () , None
143
143
144
144
# Calculate two trails: one from the next instruction, and one from the
145
145
# jump_target instruction.
You can’t perform that action at this time.
0 commit comments