Commit 1dcba9b
Fix Pydantic model forward references and improve error messages
Fix issue where real-world pins.lock files were incorrectly reported as
malformed due to unresolved forward references in Pydantic models.
Changes:
- Call model_rebuild() on Package and LockFile after importing all
package types to resolve forward references
- Chain validation errors using 'from e' to preserve detailed error
information for debugging while showing user-friendly message
The model_rebuild() calls are necessary because the lockfile models use
forward references to package types (GAPackageDef, QuadPackageDef, etc.)
that are only imported later in the __init__.py file.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent c6a4741 commit 1dcba9b
2 files changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
84 | 89 | | |
85 | 90 | | |
86 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
0 commit comments