Skip to content

Commit 6e33aa4

Browse files
committed
fix mypy
1 parent 0ea7fe0 commit 6e33aa4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/designer_plugin/d3sdk/ast_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ class PackageInfo(BaseModel):
5555

5656
def to_import_statement(self) -> str:
5757
"""Render back to a Python import statement using ast.unparse."""
58+
node: ast.stmt
5859
if self.methods:
5960
node = ast.ImportFrom(
6061
module=self.package,
@@ -445,7 +446,7 @@ def _collect_used_names(func_node: ast.FunctionDef | ast.AsyncFunctionDef) -> se
445446
names.add(node.id)
446447
elif isinstance(node, ast.Attribute):
447448
# Walk down the attribute chain to find the root name
448-
root = node
449+
root: ast.expr = node
449450
while isinstance(root, ast.Attribute):
450451
root = root.value
451452
if isinstance(root, ast.Name):

0 commit comments

Comments
 (0)