Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We can support Django type checking via mypy's django-stubs plugin. The required mypy.ini configuration is simply:
[mypy] plugins = mypy_django_plugin.main [mypy.plugins.django-stubs] django_settings_module = scripts.tests_settings
With a minimal tests_settings.py file:
SECRET_KEY = "1" INSTALLED_APPS = ( "django.contrib.contenttypes", "django.contrib.sites", "django.contrib.sessions", "django.contrib.messages", "django.contrib.admin.apps.SimpleAdminConfig", "django.contrib.staticfiles", "django.contrib.auth", "channels", )
I propose we extend our typing tools to support mypy plugins by adding the "plugins" field to the KNOWN_METADATA_TOOL_FIELDS dictionary:
KNOWN_METADATA_TOOL_FIELDS: Final = { "stubtest": { "skip", "apt_dependencies", "brew_dependencies", "choco_dependencies", "extras", "ignore_missing_stub", "platforms", "stubtest_requirements", }, "mypy": { "plugins", } }
This would allow package maintainers to specify in their METADATA.toml:
[tool.mypy] plugins = "mypy_django_plugin.main" [tool.mypy.plugins.django-stubs] django_settings_module = "scripts.tests_settings"
This enhancement would enable proper stubtest functionality for Django-based stubs libraries. What do you think about this idea?
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
We can support Django type checking via mypy's django-stubs plugin. The required mypy.ini configuration is simply:
With a minimal tests_settings.py file:
I propose we extend our typing tools to support mypy plugins by adding the "plugins" field to the KNOWN_METADATA_TOOL_FIELDS dictionary:
This would allow package maintainers to specify in their METADATA.toml:
This enhancement would enable proper stubtest functionality for Django-based stubs libraries. What do you think about this idea?
The text was updated successfully, but these errors were encountered: