fix(models): make grammar models work with Annotated
Metadata
Current evaluation
Merged a fix enabling grammar models to support Python's Annotated type hints. Approved by two reviewers, passed CI, and updated two files (+66/-14).
Suggested action: —
No scores available.
Issue body
This makes grammar models work with annotated types.
- [x] Have you followed the guidelines for contributing?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] Have you successfully run `tox`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged a fix enabling grammar models to support Python's Annotated type hints. Approved by two reviewers, passed CI, and updated two files (+66/-14). | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a fix enabling grammar models to properly handle Python's Annotated type hints. Authored by maintainer lengau, the change passed all checks and was successfully integrated. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #21 feat: add create_grammar_model() | craft-grammar | merged | Merged create_grammar_model(), generating grammar-aware classes from Pydantic models by converting standard types. Approved by two reviewers, passes CI, and adds 245 lines across four files. | |
| #4 models: create grammar-aware pydantic models (CRAFT-856) | craft-grammar | merged | Merged. Introduces grammar-aware Pydantic models (GrammarStr, GrammarStrList, GrammarSingleEntryDictList) for lifecycle part build-environment attributes. Approved by one reviewer, passed CI, and modified 10 files. |