← Back to issue list

charmlibs: skip non top-level name assignments

View original Github issue

Metadata

Project
charmcraft
Number
#1085
Type
pull request
State
merged
Author
sergiusens
Labels
Created
Updated
Closed

Current evaluation

Merged a charmlibs fix for incorrect non-top-level assignment parsing. Filters ast.Names during ast.Assign evaluation to ignore chained attribute assignments. Approved by one reviewer and merged with a +15/-1 diff across two files.

Suggested action:

No scores available.

Issue body

Without filtering for ast.Names when looking for ast.Assign, we also falled into looking for assignments of the form `module_name.method_call().attribute = assignment`

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged a charmlibs fix for incorrect non-top-level assignment parsing. Filters ast.Names during ast.Assign evaluation to ignore chained attribute assignments. Approved by one reviewer and merged with a +15/-1 diff across two files.
qwen3.6-35b-a3b-mtp-q6 Merged a fix resolving a charmlibs AST parsing bug. The change filters for top-level name assignments, preventing false matches on chained attribute assignments like module.method().attr = value.
qwen3.6-35b-a3b-mtp-q6 Merged a charmlib parsing fix that filters for ast.Names during ast.Assign checks. This prevents incorrectly matching nested attribute assignments, ensuring only top-level names are processed.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1303 refactor(utils): move charmlibs utilities charmcraft merged Merged a refactor moving charmlibs utilities across eight files, adding 61 lines and removing 42. Approved by two reviewers with zero unresolved comments.
70%