Skip to content

Commit 2e54176

Browse files
ref: add row type to our custom QuerySet
1 parent c0e8cd2 commit 2e54176

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/sentry/db/models/manager/base_query_set.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
from django.db import connections, router, transaction
88
from django.db.models import QuerySet, sql
99

10-
from sentry.db.models.manager.types import M
10+
from sentry.db.models.manager.types import M, R
1111
from sentry.signals import post_update
1212

1313

14-
class BaseQuerySet(QuerySet[M]):
14+
class BaseQuerySet(QuerySet[M, R]):
1515
def __init__(self, *args: Any, **kwargs: Any) -> None:
1616
super().__init__(*args, **kwargs)
1717
self._with_post_update_signal = False
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import annotations
22

3-
from typing import TypeVar
4-
53
from django.db.models import Model
4+
from typing_extensions import TypeVar
65

76
M = TypeVar("M", bound=Model, covariant=True)
7+
R = TypeVar("R", covariant=True, default=M)

0 commit comments

Comments
 (0)