Skip to content

Commit

Permalink
ref: add row type to our custom QuerySet
Browse files Browse the repository at this point in the history
  • Loading branch information
asottile-sentry committed Jul 1, 2024
1 parent fe8da9b commit 062a087
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/sentry/db/models/manager/base_query_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
from django.db import connections, router, transaction
from django.db.models import QuerySet, sql

from sentry.db.models.manager.types import M
from sentry.db.models.manager.types import M, R
from sentry.signals import post_update


class BaseQuerySet(QuerySet[M]):
class BaseQuerySet(QuerySet[M, R]):
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
self._with_post_update_signal = False
Expand Down
4 changes: 2 additions & 2 deletions src/sentry/db/models/manager/types.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

from typing import TypeVar

from django.db.models import Model
from typing_extensions import TypeVar

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

0 comments on commit 062a087

Please sign in to comment.