mirror of
https://github.com/pretix/pretix.git
synced 2025-12-22 16:52:27 +00:00
Added python3.5-style type annotations to pretix.base
This commit is contained in:
@@ -12,13 +12,13 @@ class UserManager(BaseUserManager):
|
||||
model documentation to see what's so special about our user model.
|
||||
"""
|
||||
|
||||
def create_user(self, email, password=None, **kwargs):
|
||||
def create_user(self, email: str, password: str=None, **kwargs):
|
||||
user = self.model(email=email, **kwargs)
|
||||
user.set_password(password)
|
||||
user.save()
|
||||
return user
|
||||
|
||||
def create_superuser(self, email, password=None): # NOQA
|
||||
def create_superuser(self, email: str, password: str=None): # NOQA
|
||||
# Not used in the software but required by Django
|
||||
if password is None:
|
||||
raise Exception("You must provide a password")
|
||||
|
||||
Reference in New Issue
Block a user