Skip to content

Commit

Permalink
format code
Browse files Browse the repository at this point in the history
  • Loading branch information
cocolato committed Feb 4, 2024
1 parent 5eab1c5 commit d0a0981
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions mako/codegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -840,12 +840,14 @@ def visitControlLine(self, node):
children = node.get_children()

def should_add_pass(node, children):
# this covers the three situations where we want to insert a pass:
# 1) a ternary control line with no children,
# 2) a primary control line with nothing but its own ternary
# and end control lines, and
# 3) any control line with no content other than comments
# 4) the first control line with no content other than comments
# this covers the four situations
# where we want to insert a pass:
# 1) a ternary control line with no children,
# 2) a primary control line with nothing but its own ternary
# and end control lines, and
# 3) any control line with no content other than comments
# 4) the first control block with no content
# other than comments
if not children:
return True
elif all(
Expand Down

0 comments on commit d0a0981

Please sign in to comment.