We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0ea7fe0 commit 6e33aa4Copy full SHA for 6e33aa4
1 file changed
src/designer_plugin/d3sdk/ast_utils.py
@@ -55,6 +55,7 @@ class PackageInfo(BaseModel):
55
56
def to_import_statement(self) -> str:
57
"""Render back to a Python import statement using ast.unparse."""
58
+ node: ast.stmt
59
if self.methods:
60
node = ast.ImportFrom(
61
module=self.package,
@@ -445,7 +446,7 @@ def _collect_used_names(func_node: ast.FunctionDef | ast.AsyncFunctionDef) -> se
445
446
names.add(node.id)
447
elif isinstance(node, ast.Attribute):
448
# Walk down the attribute chain to find the root name
- root = node
449
+ root: ast.expr = node
450
while isinstance(root, ast.Attribute):
451
root = root.value
452
if isinstance(root, ast.Name):
0 commit comments