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

ref: add row type to our custom QuerySet #73589

Merged
merged 1 commit into from
Jul 1, 2024
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
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)
Loading