Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tehrengruber committed Mar 2, 2025
1 parent 9653694 commit dfe819c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gt4py/eve/visitors.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def generic_visit(self, node: concepts.RootNode, **kwargs: Any) -> Any:
if (new_child := self.visit(child, **kwargs)) is not NOTHING
}
)
if self.PRESERVED_ANNEX_ATTRS and (old_annex := getattr(node, "__node_annex__", None)):
if self.PRESERVED_ANNEX_ATTRS and getattr(node, "__node_annex__", None):
_preserve_annex(node, new_node, self.PRESERVED_ANNEX_ATTRS)

return new_node
Expand Down Expand Up @@ -207,7 +207,7 @@ def visit(self, node: concepts.RootNode, **kwargs: Any) -> Any:
isinstance(node, concepts.Node)
and isinstance(new_node, concepts.Node)
and self.PRESERVED_ANNEX_ATTRS
and (old_annex := getattr(node, "__node_annex__", None))
and getattr(node, "__node_annex__", None)
):
_preserve_annex(node, new_node, self.PRESERVED_ANNEX_ATTRS)

Expand Down

0 comments on commit dfe819c

Please sign in to comment.