Skip to content

Commit 1e64cf7

Browse files
committed
fix types
1 parent 9afb219 commit 1e64cf7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/idom/_console/rewrite_key_declarations.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from textwrap import indent
1010
from tokenize import COMMENT as COMMENT_TOKEN
1111
from tokenize import generate_tokens
12-
from typing import Iterator
12+
from typing import Any, Iterator
1313

1414
import 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

141141
def 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

0 commit comments

Comments
 (0)