Hi! Is there a way to configure mypy to have per t...
# general
w
Hi! Is there a way to configure mypy to have per target options? Context is I’d like some directories to have stricter checks than others, e.g. with the structure
Copy code
a/b1/c/PANTSBUILD
a/b2/PANTSBUILD
I’d like
a/b1/c
to specify
--check-untyped-defs
but
a/b2
to use the default. Maybe some way to use multiple mypy.ini files? This is part of an approach to get incremental typing into the codebase. SOLVED: I can do per module spec in the mypy.ini e.g.
Copy code
[mypy-mycode.foo.*]
disallow_untyped_defs = True
b
I think mypy supports this naturally from a single config: https://mypy.readthedocs.io/en/stable/config_file.html#per-module-and-global-options
w
Thanks! just found that