mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-02-16 19:41:03 +03:00
Ignore type errors from mypy
This commit is contained in:
parent
34f8a2e154
commit
9fd3154127
|
@ -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