File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -687,12 +687,20 @@ def rungs(self):
687687
688688 @cache
689689 def _synthesize_rungs (self ):
690+ # self.rails may contain additoinal nodes through flattening
691+ # at this point we know that we only have two paths, both paths are rails
692+ # so we can access the original nodes by parsing and filtering the original path
693+ paths = Path (self .parse_path ()).break_apart ()
694+ rails = [list (path .end_points ) for path in paths if len (list (path .end_points )) > 1 ]
695+ if len (rails ) != 2 :
696+ return []
697+
690698 rung_endpoints = []
691699 # check for unequal length of rails
692- equal_length = len (self . rails [0 ]) == len (self . rails [1 ])
700+ equal_length = len (rails [0 ]) == len (rails [1 ])
693701
694702 rails_to_reverse = self ._get_rails_to_reverse ()
695- for i , points in enumerate (self . rails ):
703+ for i , points in enumerate (rails ):
696704
697705 if rails_to_reverse [i ]:
698706 points = points [::- 1 ]
You can’t perform that action at this time.
0 commit comments