From b1650dbada8fba182ad4abfbe25c292b8992f8cb Mon Sep 17 00:00:00 2001 From: Tristan Simas Date: Wed, 28 Oct 2026 21:35:30 -0400 Subject: [PATCH] mypy reads Toad's declared source roots, src and tools 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 Claude-Session: https://claude.ai/code/session_01RnH6dS2Kmg1WxNnAc78YHA --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 564a0629e..f709fc75e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,3 +84,4 @@ markers = ["refactor_guard: permanent architecture deletion guards"] [tool.mypy] follow_untyped_imports = true +mypy_path = ["src", "tools"]