quaint-telephone-89068
11/26/2025, 5:00 PMpure_python/
django_project/
utils/
pyproject.toml
pants.toml
I’m trying to keep a monorepo layout. The problem arises when executing:
pants check ::
I have set mypy to use django-stubs for type checking inside of django_project, but the Django-specific mypy configuration is being applied to all Python targets including pure_python. This causes errors such as:
django_project.settings not found
because pure_python obviously has no Django settings module. I want Django type-checking with django-stubs only for django_project/. However MyPy seems to apply plugin config globally. This makes non-Django packages fail pants check.
Is there a recommended way to scope mypy configuration to only certain targets / source roots so that Django settings aren't required for unrelated packages?
Thanks!
pantsbuild/pants