rework settings, add loading of the django.conf.global_settings, cleanups

This commit is contained in:
Maxim Kurnikov
2019-02-07 19:13:39 +03:00
parent faee26703e
commit d4cb729c93
11 changed files with 180 additions and 361 deletions

View File

@@ -23,7 +23,13 @@ plugins =
in your `mypy.ini` file.
Also, it uses value of `DJANGO_SETTINGS_MODULE` from the environment, so set it before execution, otherwise some features will not work.
### `django.conf.settings` support
`settings.SETTING_NAME` will only work if `DJANGO_SETTINGS_MODULE` will be present in the environment, when mypy is executed.
If some setting is not recognized to the plugin, but it's clearly there, try adding type annotation to it.
## To get help