Repository navigation
Move the reuse, collapse and discriminator passes into their own modules - #5259
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Merging this PR will improve performance by 43.5%2 warnings
Performance Changes
Tip Curious why performance improved? Comment Comparing Footnotes
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Breaking Change AnalysisResult: No breaking changes detected Reasoning: This PR is an internal refactor. The private, name-mangled Parser methods for model reuse, root model collapsing and discriminator tagging move out of parser/base.py and become functions in parser/_passes/modules.py, reached through narrow host protocols (ReuseHost, CollapseHost, DiscriminatorHost). Their private helpers move to parser/_passes/_shared.py. The pipeline tables now call the module functions, and the logic is copied over unchanged, so the generated code is the same. No CLI options, defaults, templates or Python version support change. Public names stay the same: get_most_of_parent is still exported from parser.base as an alias, and Parser._get_enum_discriminator_literal is kept and now delegates to enum_discriminator_literal. The moved warnings go through a new warn_as_parser_base helper. It keeps the UserWarning category, the stacklevel meaning and the parser.base module attribution, so existing warning filters by module still match. The only removed names are underscore-prefixed or name-mangled internals, such as the double-underscore Parser methods and helpers like _get_discriminator_field_value and _get_enum_from_base in parser.base. The tests were updated for these moves, but they are not public API, so nothing here breaks for users. This analysis was produced by the release draft workflow |
Summary by CodeRabbit