I'm using a src
directory as root source directory in my django projects.
I'm trying to perform pre-commit actions on those django projects, with mypy and django-stubs.
Is is a way to say in pyproject.toml than the source root is in src/
?
For now, I've:
[tool.django-stubs]
django_version = "3.2"
django_apps = ["account", "seniors", "seniors_app"]
django_settings_module = "seniors.settings.dev"
ignore_missing_settings = true
ignore_missing_model_attributes = true
pre-commit run --all
...
ModuleNotFoundError: No module named 'seniors'
When I put django_settings_module = "src.seniors.settings.dev"
, I've some errors later on importing the other modules ( account
...)
Have you any ideas ? For sure I don't want to change my project layout !
Thanks !
Use the
--config-file