File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 9
9
from textwrap import indent
10
10
from tokenize import COMMENT as COMMENT_TOKEN
11
11
from tokenize import generate_tokens
12
- from typing import Iterator
12
+ from typing import Any , Iterator
13
13
14
14
import click
15
15
@@ -94,7 +94,7 @@ def find_nodes_to_change(tree: ast.AST) -> list[Sequence[ast.AST]]:
94
94
else :
95
95
continue
96
96
97
- maybe_attr_dict_node = None
97
+ maybe_attr_dict_node : Any | None = None
98
98
if name == "vdom" :
99
99
if len (node .args ) == 1 :
100
100
# vdom("tag") need to add attr dict
@@ -139,7 +139,7 @@ def find_nodes_to_change(tree: ast.AST) -> list[Sequence[ast.AST]]:
139
139
140
140
141
141
def rewrite_changed_nodes (
142
- file : str ,
142
+ file : Path ,
143
143
source : str ,
144
144
tree : ast .AST ,
145
145
changed : list [Sequence [ast .AST ]],
@@ -210,7 +210,7 @@ def rewrite_changed_nodes(
210
210
return "\n " .join (lines )
211
211
212
212
213
- def log_could_not_rewrite (file : str , tree : ast .AST ) -> None :
213
+ def log_could_not_rewrite (file : Path , tree : ast .AST ) -> None :
214
214
for node in ast .walk (tree ):
215
215
if not (isinstance (node , ast .Call ) and node .keywords ):
216
216
continue
You can’t perform that action at this time.
0 commit comments