From 8a9b4eb58a97dae79b965a1ba2f3865dc16bbd98 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 24 Apr 2024 15:35:31 +0100 Subject: [PATCH 1/4] Update mypy from 1.7.1 to 1.10.0 --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 12724a65..601271c4 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -13,7 +13,7 @@ watchfiles==0.21.0 # https://github.com/samuelcolvin/watchfiles # Testing # ------------------------------------------------------------------------------ -mypy==1.7.1 # https://github.com/python/mypy +mypy==1.10.0 # https://github.com/python/mypy django-stubs[compatible-mypy]==4.2.7 # https://github.com/typeddjango/django-stubs pytest==8.1.1 # https://github.com/pytest-dev/pytest pytest-sugar==1.0.0 # https://github.com/Frozenball/pytest-sugar From f0d2f40a2edd4dee61ddd4f62c7eb936ceded966 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Tue, 30 Apr 2024 12:42:58 +0100 Subject: [PATCH 2/4] Update django-stubs from 4.2.7 to 5.0.0 --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 07c2aa15..ac1a0477 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -14,7 +14,7 @@ watchfiles==0.21.0 # https://github.com/samuelcolvin/watchfiles # Testing # ------------------------------------------------------------------------------ mypy==1.7.1 # https://github.com/python/mypy -django-stubs[compatible-mypy]==4.2.7 # https://github.com/typeddjango/django-stubs +django-stubs[compatible-mypy]==5.0.0 # https://github.com/typeddjango/django-stubs pytest==8.2.0 # https://github.com/pytest-dev/pytest pytest-sugar==1.0.0 # https://github.com/Frozenball/pytest-sugar {%- if cookiecutter.use_drf == "y" %} From 4c46f4b97e68c0759057a15a001325598b22c6af Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Tue, 30 Apr 2024 22:36:47 +0100 Subject: [PATCH 3/4] Update djangorestframework-stubs from 3.14.5 to 3.15.0 --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 07c2aa15..5afd8794 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -18,7 +18,7 @@ django-stubs[compatible-mypy]==4.2.7 # https://github.com/typeddjango/django-st pytest==8.2.0 # https://github.com/pytest-dev/pytest pytest-sugar==1.0.0 # https://github.com/Frozenball/pytest-sugar {%- if cookiecutter.use_drf == "y" %} -djangorestframework-stubs[compatible-mypy]==3.14.5 # https://github.com/typeddjango/djangorestframework-stubs +djangorestframework-stubs[compatible-mypy]==3.15.0 # https://github.com/typeddjango/djangorestframework-stubs {%- endif %} # Documentation From 9fd3154127e84165163bc1c99c588bdc3d5ddc8a Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Mon, 13 May 2024 19:53:55 +0100 Subject: [PATCH 4/4] Ignore type errors from mypy --- .../{{cookiecutter.project_slug}}/users/forms.py | 4 ++-- .../{{cookiecutter.project_slug}}/users/tests/test_admin.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/forms.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/forms.py index 830fca60..35a70101 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/forms.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/forms.py @@ -10,7 +10,7 @@ from .models import User class UserAdminChangeForm(admin_forms.UserChangeForm): - class Meta(admin_forms.UserChangeForm.Meta): + class Meta(admin_forms.UserChangeForm.Meta): # type: ignore[name-defined] model = User {%- if cookiecutter.username_type == "email" %} field_classes = {"email": EmailField} @@ -23,7 +23,7 @@ class UserAdminCreationForm(admin_forms.UserCreationForm): To change user signup, see UserSignupForm and UserSocialSignupForm. """ - class Meta(admin_forms.UserCreationForm.Meta): + class Meta(admin_forms.UserCreationForm.Meta): # type: ignore[name-defined] model = User {%- if cookiecutter.username_type == "email" %} fields = ("email",) diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_admin.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_admin.py index f802b8ba..66555c4e 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_admin.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_admin.py @@ -62,7 +62,7 @@ class TestUserAdmin: # Reload the admin module to apply the setting change import {{ cookiecutter.project_slug }}.users.admin as users_admin - with contextlib.suppress(admin.sites.AlreadyRegistered): + with contextlib.suppress(admin.sites.AlreadyRegistered): # type: ignore[attr-defined] reload(users_admin) @pytest.mark.django_db()