You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I cd libs/subpackageA to do development work in just subpackageA, I would like for my type checking to be driven by a common mypy.ini file, at the top level of my repo. However, mypy won't walk up the filesystem to discover the mypy.ini file at the top-level. Contrast that with ruff's discovery rules which do walk up the filesystem until it finds a ruff.toml file.
There are workarounds: 1) symlink the subprojects's mypy.ini to the root level mypy.ini; 2) copy the same mypy.ini file into each subpackage directory. Neither option is all that great. A rule similar to ruff's would let me eliminate the symlinks and move the mypy.ini file to the root of my repo, so that its settings can be easily shared across all subpackages in my monorepo.
Activity
michealroberts commentedon Mar 13, 2024
Could the priority on this be bumped please, we have a pressing need for mypy to play a little nicer with monorepos.
Currently, I am unsure as to why mypy cannot follow the same rules as Python ... could someone explain to me why this is not possible?
Goldziher commentedon Sep 15, 2024
+1
Walk up for all config files and handle precedence (#18482)
Walk up for all config files and handle precedence (#18482)
Walk up for all config files and handle precedence (python#18482)