Skip to content

Commit 0f95fb2

Browse files
committed
Remove QuerySetType in favor of QuerySet
1 parent bd1df9b commit 0f95fb2

File tree

3 files changed

+5
-75
lines changed

3 files changed

+5
-75
lines changed

styleguide_example/common/types.py

Lines changed: 0 additions & 70 deletions
This file was deleted.

styleguide_example/testing_examples/selectors/schools.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from datetime import date
2-
from typing import Optional, Iterable
2+
from typing import Optional
33

4-
from django.db.models.query import Q
4+
from django.db.models.query import Q, QuerySet
55
from django.core.exceptions import ValidationError
66

77
from styleguide_example.testing_examples.models import School, SchoolCourse
@@ -16,7 +16,7 @@ def school_list_school_courses(
1616
school: School,
1717
start_date: Optional[date] = None,
1818
end_date: Optional[date] = None
19-
) -> Iterable[SchoolCourse]:
19+
) -> QuerySet[SchoolCourse]:
2020
if start_date is None and end_date:
2121
raise ValidationError(SCHOOL_LIST_SCHOOL_COURSES_PROVIDE_START_DATE_MSG)
2222

styleguide_example/users/selectors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from styleguide_example.common.types import QuerySetType
1+
from django.db.models.query import QuerySet
22

33
from styleguide_example.users.models import BaseUser
44
from styleguide_example.users.filters import BaseUserFilter
@@ -14,7 +14,7 @@ def user_get_login_data(*, user: BaseUser):
1414
}
1515

1616

17-
def user_list(*, filters=None) -> QuerySetType[BaseUser]:
17+
def user_list(*, filters=None) -> QuerySet[BaseUser]:
1818
filters = filters or {}
1919

2020
qs = BaseUser.objects.all()

0 commit comments

Comments
 (0)