Skip to content

Commit

Permalink
Removed redundant fork in AST traversing in SplitTooLongLine
Browse files Browse the repository at this point in the history
These two innocuous lines meant that processing time increases exponentially with the number of `ELSE IF`s, causing performance issues in specific situations.
  • Loading branch information
Lakitna committed Oct 5, 2023
1 parent e8ce2ab commit 498ae1d
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions robotidy/transformers/SplitTooLongLine.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ def visit_Section(self, node): # noqa
def visit_If(self, node): # noqa
if self.is_inline(node):
return node
if node.orelse:
self.generic_visit(node.orelse)
return self.generic_visit(node)

@staticmethod
Expand Down

0 comments on commit 498ae1d

Please sign in to comment.