Unverified Commit 2b1f5990 authored by Kuris's avatar Kuris Committed by GitHub
Browse files

[Fix] Fix a type that make wrong T.macro backtrace (#1234)

parent 454a9df6
...@@ -22,7 +22,6 @@ def _compute_version() -> str: ...@@ -22,7 +22,6 @@ def _compute_version() -> str:
version_file = repo_root / "VERSION" version_file = repo_root / "VERSION"
if version_file.is_file(): if version_file.is_file():
try: try:
import version_provider
from version_provider import dynamic_metadata # type: ignore from version_provider import dynamic_metadata # type: ignore
return dynamic_metadata("version") return dynamic_metadata("version")
except Exception: except Exception:
......
...@@ -553,7 +553,7 @@ class DSLMutator(ast.NodeTransformer): ...@@ -553,7 +553,7 @@ class DSLMutator(ast.NodeTransformer):
def visit_Name(self, node: ast.Name): def visit_Name(self, node: ast.Name):
if isinstance(node.ctx, ast.Load): if isinstance(node.ctx, ast.Load):
return quote_expr(f"__tb.rval('{node.id}', {node.id})", span=node) return quote_expr(f"__tb.rval('{node.id}', node)", node=node, span=node)
return node return node
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment