Skip to content

Commit

Permalink
Merge branch 'cross_sync2_pr2_annotations' into cross_sync2_pr3_gener…
Browse files Browse the repository at this point in the history
…ated_sync
  • Loading branch information
daniel-sanche committed Sep 17, 2024
2 parents afe25fe + 85f2bfd commit 1dc12c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .cross_sync/transformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def visit_If(self, node):
return [self.visit(n) for n in kept_branch]
else:
# keep the entire if statement
return self.visit(node)
return self.generic_visit(node)

def _is_async_check(self, node) -> bool:
"""
Expand Down Expand Up @@ -248,7 +248,7 @@ def get_output_path(self, node):
for target in n.targets:
if isinstance(target, ast.Name) and target.id == self.FILE_ANNOTATION:
# return the output path
return n.value.value.replace(".", "/") + ".py"
return n.value.s.replace(".", "/") + ".py"

def visit_Module(self, node):
# look for __CROSS_SYNC_OUTPUT__ Assign statement
Expand Down

0 comments on commit 1dc12c8

Please sign in to comment.