Skip to content

Commit ce6de42

Browse files
committed
Fix munging of __version__
1 parent 1fa9182 commit ce6de42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

circuitpython_build_tools/munge.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def process_statement(node):
9999
# return the statements in the else branch of 'if TYPE_CHECKING: ...'
100100
elif ast.unparse(node.test) == 'TYPE_CHECKING':
101101
replace(node.lineno, 'if 0:')
102-
elif isinstance(node, ast.Assign) and node.targets[0].id == '__version__':
102+
elif isinstance(node, ast.Assign) and isinstance(node.targets[0], ast.Name) and node.targets[0].id == '__version__':
103103
replace(node.lineno, f"__version__ = \"{version_str}\"")
104104

105105
content = pathlib.Path(path).read_text(encoding="utf-8")

0 commit comments

Comments
 (0)