@@ -298,9 +298,7 @@ def add_to_splice_points():
298298 path_flips [curr_x ].append (curr_y )
299299 curr_x += 1
300300 assert curr_x != last_x
301- path_dir = (
302- WD .North if goal [curr_x ][curr_y - 1 ] else WD .South
303- )
301+ path_dir = WD .North if goal [curr_x ][curr_y - 1 ] else WD .South
304302 if do_splice or (curr_x , curr_y ) != (start_x , start_y ):
305303 subpath_tail .cmds += abs_or_delta ("hH" , curr_x , last_x )
306304
@@ -322,17 +320,12 @@ def add_to_splice_points():
322320 path_flips [curr_x ] = []
323321 path_flips [curr_x ].append (curr_y )
324322 assert curr_x != last_x
325- path_dir = (
326- WD .South if goal [curr_x - 1 ][curr_y ] else WD .North
327- )
323+ path_dir = WD .South if goal [curr_x - 1 ][curr_y ] else WD .North
328324 if do_splice or (curr_x , curr_y ) != (start_x , start_y ):
329325 subpath_tail .cmds += abs_or_delta ("hH" , curr_x , last_x )
330326
331327 # only a left turn with a hole coming up on the right is spliceable
332- if (
333- path_dir == WD .South
334- and not goal [curr_x - 1 ][curr_y - 1 ]
335- ):
328+ if path_dir == WD .South and not goal [curr_x - 1 ][curr_y - 1 ]:
336329 add_to_splice_points ()
337330
338331 if (curr_x , curr_y ) == (start_x , start_y ):
@@ -346,9 +339,7 @@ def add_to_splice_points():
346339 ):
347340 curr_y -= 1
348341 assert curr_y != last_y
349- path_dir = (
350- WD .West if goal [curr_x - 1 ][curr_y - 1 ] else WD .East
351- )
342+ path_dir = WD .West if goal [curr_x - 1 ][curr_y - 1 ] else WD .East
352343 if do_splice or (curr_x , curr_y ) != (start_x , start_y ):
353344 subpath_tail .cmds += abs_or_delta ("vV" , curr_y , last_y )
354345
0 commit comments