Add mypy plugin support to stubtest configuration (#13948)

This commit is contained in:
Huy Nguyen
2025-05-11 19:45:30 +07:00
committed by GitHub
parent 0933303ff0
commit a8fa1ab0d9
6 changed files with 61 additions and 5 deletions
+6
View File
@@ -229,6 +229,12 @@ This has the following keys:
If not specified, stubtest is run only on `linux`.
Only add extra OSes to the test
if there are platform-specific branches in a stubs package.
* `mypy_plugins` (default: `[]`): A list of Python modules to use as mypy plugins
when running stubtest. For example: `mypy_plugins = ["mypy_django_plugin.main"]`
* `mypy_plugins_config` (default: `{}`): A dictionary mapping plugin names to their
configuration dictionaries for use by mypy plugins. For example:
`mypy_plugins_config = {"django-stubs" = {"django_settings_module" = "@tests.django_settings"}}`
`*_dependencies` are usually packages needed to `pip install` the implementation
distribution.