mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-01-24 08:14:13 +03:00
Merge pull request #5022 from cookiecutter/pyup-update-mypy-1.7.1-to-1.10.0
Update mypy to 1.10.0
This commit is contained in:
commit
4710101acd
|
@ -13,12 +13,12 @@ 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
|
||||
mypy==1.10.0 # https://github.com/python/mypy
|
||||
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" %}
|
||||
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
|
||||
|
|
|
@ -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",)
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user