Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AbstractBaseUser.REQUIRED_FIELDS is a ClassVar #1737

Merged
merged 1 commit into from
Sep 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions django-stubs/contrib/auth/base_user.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Literal, TypeVar, overload
from typing import Any, ClassVar, Literal, TypeVar, overload

from django.db import models
from django.db.models.base import Model
Expand All @@ -14,7 +14,7 @@ class BaseUserManager(models.Manager[_T]):
def get_by_natural_key(self, username: str | None) -> _T: ...

class AbstractBaseUser(models.Model):
REQUIRED_FIELDS: list[str]
REQUIRED_FIELDS: ClassVar[list[str]]

password = models.CharField(max_length=128)
last_login = models.DateTimeField(blank=True, null=True)
Expand Down