Repository navigation
Read the import edges of the written modules, the exports a package reaches and the module dependency graph with its failing cycles in one place each - #6155
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
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 37.16%2 warnings
Performance Changes
Tip Curious why performance improved? Comment Comparing Footnotes
|
Breaking Change AnalysisResult: No breaking changes detected Reasoning: This PR is an internal refactor with the same behaviour as before. It moves the import-edge and import-cycle helpers (_written_package, relative_import_targets, _failing_cycles, _exported_imports, _failing_import_cycles and the module dependency graph construction) out of parser/_passes/imports.py and parser/_passes/structure.py into a new private module, parser/_passes/_import_edges.py. It also adds a private helper, exports_reach, to parser/_init_exports.py, and updates the architecture docs and the boundary-check script. I checked each moved or rewritten piece against the old code and found the logic unchanged. The new exports_reach check in collect_exports_for_init skips the same modules as the old Children-scope depth test. The rewritten _exported_imports loop picks the same package prefixes for the children and recursive scopes. The exporting set built with exported_names matches the old short_name check. _loaded_modules still gathers the same targets and adds the same written modules under all-exports-scope. _failing_import_cycles now receives the internal module paths from its caller, which computes them with the same compute_internal_module_path call. The relocated functions are private or live in underscore-prefixed modules, and relative_import_targets is still imported into imports.py, so no public Python API or CLI option is removed or changed. Nothing touches templates, defaults, error reporting or supported Python versions. The behaviour diff gate compares against the last release, so it covers more than this PR. Its accepted cells involve discriminator mappings, constraint handling, numeric precision and JSON pointers, none of which this diff touches, and none involve the opt-in all-exports-scope or the cycle merging this PR refactors. So those cells do not come from this PR. This analysis was produced by the release draft workflow |
Summary by CodeRabbit