From 9d5de612410325c928f7760935adcff40bcbc751 Mon Sep 17 00:00:00 2001 From: Jonas L Date: Sat, 9 Apr 2022 12:18:23 +0200 Subject: [PATCH] chore(api): add mypy django stubs plugins (#1726) --- api/pyproject.toml | 9 +++++++++ api/setup.py | 2 ++ 2 files changed, 11 insertions(+) diff --git a/api/pyproject.toml b/api/pyproject.toml index 7fbc2ef67..bf19500e7 100644 --- a/api/pyproject.toml +++ b/api/pyproject.toml @@ -13,6 +13,15 @@ disable = [ [tool.pylint.design] max-parents = 15 +[tool.mypy] +plugins = [ + "mypy_django_plugin.main", + "mypy_drf_plugin.main", +] + +[tool.django-stubs] +django_settings_module = "libretime_api.settings.testing" + [build-system] requires = ["setuptools", "wheel"] build-backend = "setuptools.build_meta" diff --git a/api/setup.py b/api/setup.py index 7f6f40d92..0d91383e4 100644 --- a/api/setup.py +++ b/api/setup.py @@ -41,6 +41,8 @@ setup( "psycopg2", ], "dev": [ + "django-stubs", + "djangorestframework-stubs", "model_bakery", "psycopg2-binary", "pylint-django",