From 0f515974cb85e1c948bbdaae7874fd853ce35e56 Mon Sep 17 00:00:00 2001 From: Dani Hodovic Date: Wed, 11 Dec 2019 14:58:21 +0100 Subject: [PATCH] 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 --- {{cookiecutter.project_slug}}/setup.cfg | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/setup.cfg b/{{cookiecutter.project_slug}}/setup.cfg index 42b63861..f7cd01cb 100644 --- a/{{cookiecutter.project_slug}}/setup.cfg +++ b/{{cookiecutter.project_slug}}/setup.cfg @@ -9,13 +9,14 @@ exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules [mypy] python_version = 3.7 check_untyped_defs = True -ignore_errors = False ignore_missing_imports = True -strict_optional = True warn_unused_ignores = True warn_redundant_casts = True warn_unused_configs = True +[mypy.plugins.django-stubs] +django_settings_module = config.settings.test + [mypy-*.migrations.*] # Django migrations should not produce any errors: ignore_errors = True