Repository navigation
Fix the competing tools module root in mypy - #1421
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
1 commit, 1 line replaced in
pyproject.toml; one observer file identity instead of two. No production Python, checker suppression or baseline comparison change.Source-root repair
Before:
[tool.mypy].mypy_path = ["src", "tools"]. With the existing--explicit-package-bases, selectingtools/physical_ui.pynames itphysical_ui, while its consumers importtools.physical_ui. Core'sClientTypeErrors.findingsselects paths and reads the client's configuration, so both hosted #3873 jobs abort on the duplicate module before checking the dependency change.After:
["src", "."]. The repository root owns thetoolsnamespace, exactly astools/physical_ui_candidate.py,tools/physical_ui_admission.py,tools/physical_ui.py, acceptance and performance consumers already import it.srcstill ownstoad.This removes the competing root declaration; it does not rename imports, wrap the checker, edit captured baseline sources, disable diagnostics, add an alias or suppress a file.
Proof
Mypy's own
process_optionsexecuted with the same explicit-package-bases flag. Before: both physical UI input paths map to bare names andbase_dir=.../tools. After: they map totools.physical_ui/tools.physical_ui_candidateand repositorybase_dir, matching module-selected names. Both probes returned 0. Complete import scan oftools/**/*.pyfound local imports already qualified undertools; no bare observer consumer needs the removed root.A provisional
tools/__init__.pyalone did not change the source mapping because the explicit tools root still wins. It was removed before this commit, not kept as a ceremonial fix.Artifacts:
/home/ts/.cache/agent-scratch/pi-ui-performance/mypy-namespace-77.log(before),mypy-namespace-78.log(init alone insufficient),mypy-namespace-79.log(correct root). No pytest or local NRA gate run.The checker was finding the file so thoroughly it found two of it.
Assumed: the declared qualified imports remain the intended development namespace. Core #3873 must recapture/rerun with this Toad main for both materialized cuts; old immutable failure logs remain unchanged.