VSCode Ignores Mypy Type Hints When Using Django Plugins
I'm using VSCode and mypy in my Django project. My pyproject.toml configuration looks like this (following the Django Stubs README):
[tool.mypy]
mypy_path = "."
python_version = "3.13"
strict = true
plugins = ["mypy_django_plugin.main"]
[tool.django-stubs]
django_settings_module = "conf.settings"
When I run mypy in the terminal, everything works fine, and I get proper type checking.
However, in VSCode, I don't get any type hints at all. If I comment out the plugins line, mypy starts working in VSCode again.
What I've Tried:
- Running mypy manually in the terminal → Works as expected
- Commenting out plugins → VSCode starts showing hints again
- Checking that VSCode uses the correct mypy config (it's picking up pyproject.toml)
Any insights would be greatly appreciated!