File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 99from textwrap import indent
1010from tokenize import COMMENT as COMMENT_TOKEN
1111from tokenize import generate_tokens
12- from typing import Iterator
12+ from typing import Any , Iterator
1313
1414import click
1515
@@ -94,7 +94,7 @@ def find_nodes_to_change(tree: ast.AST) -> list[Sequence[ast.AST]]:
9494 else :
9595 continue
9696
97- maybe_attr_dict_node = None
97+ maybe_attr_dict_node : Any | None = None
9898 if name == "vdom" :
9999 if len (node .args ) == 1 :
100100 # vdom("tag") need to add attr dict
@@ -139,7 +139,7 @@ def find_nodes_to_change(tree: ast.AST) -> list[Sequence[ast.AST]]:
139139
140140
141141def rewrite_changed_nodes (
142- file : str ,
142+ file : Path ,
143143 source : str ,
144144 tree : ast .AST ,
145145 changed : list [Sequence [ast .AST ]],
@@ -210,7 +210,7 @@ def rewrite_changed_nodes(
210210 return "\n " .join (lines )
211211
212212
213- def log_could_not_rewrite (file : str , tree : ast .AST ) -> None :
213+ def log_could_not_rewrite (file : Path , tree : ast .AST ) -> None :
214214 for node in ast .walk (tree ):
215215 if not (isinstance (node , ast .Call ) and node .keywords ):
216216 continue
You can’t perform that action at this time.
0 commit comments