Remove mypy defaults and set django-stubs setting

https://mypy.readthedocs.io/en/latest/config_file.html

ignore_errors = False
strict_optional = True

Are both set to these values by default. No need to set them in the
config.

```toml
[mypy.plugins.django-stubs]
django_settings_module = config.settings.local
```
mypy.plugins.django-stubs requires django_settings_module to be set.
https://github.com/typeddjango/django-stubs#configuration
This commit is contained in:
Dani Hodovic 2019-12-11 14:58:21 +01:00
parent 4259af3fd8
commit 0f515974cb
No known key found for this signature in database
GPG Key ID: 15433E10A71D1221

View File

@ -9,13 +9,14 @@ exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules
[mypy] [mypy]
python_version = 3.7 python_version = 3.7
check_untyped_defs = True check_untyped_defs = True
ignore_errors = False
ignore_missing_imports = True ignore_missing_imports = True
strict_optional = True
warn_unused_ignores = True warn_unused_ignores = True
warn_redundant_casts = True warn_redundant_casts = True
warn_unused_configs = True warn_unused_configs = True
[mypy.plugins.django-stubs]
django_settings_module = config.settings.test
[mypy-*.migrations.*] [mypy-*.migrations.*]
# Django migrations should not produce any errors: # Django migrations should not produce any errors:
ignore_errors = True ignore_errors = True