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

(#83) [Fixed]: Mypy fixes in admin, models and manager accounts files. #96

Merged
merged 1 commit into from
Oct 18, 2020
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion accounts/admin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from django.contrib import admin # noqa
from django.contrib import admin # type: ignore

# Register your models here.
from accounts.models import User
Expand Down
2 changes: 1 addition & 1 deletion accounts/managers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from django.contrib.auth.models import BaseUserManager
from django.contrib.auth.models import BaseUserManager # type: ignore


class UserManager(BaseUserManager):
Expand Down
8 changes: 5 additions & 3 deletions accounts/models.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from django.contrib.auth.models import AbstractUser
from django.db import models
from typing import List

from django.contrib.auth.models import AbstractUser # type: ignore
from django.db import models # type: ignore

from accounts.managers import UserManager

Expand All @@ -19,7 +21,7 @@ class User(AbstractUser):
)

USERNAME_FIELD = "email"
REQUIRED_FIELDS = []
REQUIRED_FIELDS: List[str] = []

def __unicode__(self):
return self.email
Expand Down