Skip to content

Commit

Permalink
Proper fix of renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
d.rudenko committed Dec 18, 2024
1 parent 3b46c80 commit cedce3f
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ def visit_ImportFrom(self, node: ast.ImportFrom) -> ast.AST:
for old_value, new_value in self.import_replace_map.items():
alias.name = alias.name.replace(old_value, new_value)
if alias.name == "get_channel":
alias.name = "get_async_channel as get_channel"
# alias.asname = "get_channel"
# node.names = [alias for alias in node.names if alias.name != "get_channel"]
alias.name = "get_async_channel"
alias.asname = "get_channel"

return self.generic_visit(node)

0 comments on commit cedce3f

Please sign in to comment.