Repository navigation
mypy reads Toad's declared source roots (src, tools); pairs with Core P883 - #1314
Merged
Merged
Conversation
Core's ClientTypeErrors runs mypy from this checkout with --explicit-package-bases and no --config-file, so this pyproject's [tool.mypy] is the config it reads (no mypy.ini, .mypy.ini or setup.cfg here). Its package bases are MYPYPATH, then mypy_path, then cwd (mypy find_sources.py:93), and a file takes the first base met crawling up (:186). With only cwd, tools/performance/*.py is "tools.performance.*" while tools/acceptance.py:34-36 imports it as "performance.*", and mypy refuses: "Source file found twice under different module names". Naming tools as a root gives it the one name its importer uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnH6dS2Kmg1WxNnAc78YHA
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.
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.
One line of config: mypy reads Toad's declared source roots,
srcandtools. It is paired with Core P883. It unblocks Core's debt-src, which currently crashes on every Core PR before comparing anything:(agent-comms run 40800748028, job 123208052787)
[tool.mypy] follow_untyped_imports = true +mypy_path = ["src", "tools"]Why this config is the one the checker reads
Core
tools/debt_ratchet.py,ClientTypeErrors.checked:python -m mypywithcwd=client.checkout, this repository;TypeErrors.mypypasses--explicit-package-basesand no--config-file;MYPYPATHto Core's archivedsrcplus this checkout'ssrc.So mypy discovers its config in this checkout. Toad main has
pyproject.tomland nomypy.ini,.mypy.iniorsetup.cfg, so[tool.mypy]here is the config it selects.Why it removes the duplicate name
From mypy's
find_sources.py:MYPYPATH + options.mypy_path + [cwd](get_explicit_package_bases, line 93);_crawl_up_helper, line 186).With only cwd as a base,
tools/performance/*.py(no__init__.py) is namedtools.performance.*. Meanwhiletools/acceptance.py:34-36puts its own directory onsys.pathand importsperformance.*. Withtoolsas a base, the crawl stops attools, so the package gets the one name its importer uses.srcis listed because it is the other declared root; Core'sMYPYPATHalready names it.Scope
main(40bc10482). Toad Input delivery reads through Core's one owner-live operation (agent-comms#3538) #1302's owner-read source is not ported here and stays frozen.ef21cbf25); when this lands, that commit merges as a no-op.🤖 Generated with Claude Code
https://claude.ai/code/session_01RnH6dS2Kmg1WxNnAc78YHA