Improve typing information.
This commit is contained in:
1 parent
332f7e2332
commit
709bc6c1fc
7 files changed
+70
-39
No files matched your search
+2
-2
@@ -15,7 +15,7 @@ class UnicodeUsernameValidator(validators.RegexValidator):
|
||||
|
||||
|
||||
class UserManager(DjangoUserManager):
|
||||
def get_by_natural_key(self, username):
|
||||
def get_by_natural_key(self, username: str):
|
||||
return self.get(**{self.model.USERNAME_FIELD + "__iexact": username})
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ class User(AbstractUser):
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def normalize_username(cls, username):
|
||||
def normalize_username(cls, username: str):
|
||||
return super().normalize_username(username).lower()
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user