Skip to content

Commit

Permalink
fix: type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Feb 8, 2024
1 parent c5b304e commit dd2705c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions codeforlife/user/models/teacher.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"""

from common.models import Teacher, TeacherModelManager
from django.db import models
from django_stubs_ext.db.models import TypedModelMeta

from .school import School
Expand All @@ -22,7 +23,7 @@ class Manager(TeacherModelManager):
def get_queryset(self):
return super().get_queryset().filter(school__isnull=False)

objects: Manager = Manager()
objects: models.Manager["SchoolTeacher"] = Manager()


class NonSchoolTeacher(Teacher):
Expand All @@ -38,4 +39,4 @@ class Manager(TeacherModelManager):
def get_queryset(self):
return super().get_queryset().filter(school__isnull=True)

objects: Manager = Manager()
objects: models.Manager["NonSchoolTeacher"] = Manager()

0 comments on commit dd2705c

Please sign in to comment.