Skip to content
Merged
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
7 changes: 5 additions & 2 deletions src/sentry/api/serializers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@

import logging
from collections.abc import Callable, Mapping, MutableMapping, Sequence
from typing import Any, Generic, TypeVar, overload
from typing import TYPE_CHECKING, Any, Generic, TypeAlias, TypeVar, overload

from django.contrib.auth.models import AnonymousUser
from sentry_sdk import traces

from sentry.users.models.user import User
from sentry.users.services.user.model import RpcUser

if TYPE_CHECKING:
from sentry.auth.principal import RequestPrincipal

logger = logging.getLogger(__name__)

K = TypeVar("K")
Expand All @@ -21,7 +24,7 @@
# is migrated.
T = TypeVar("T", default=Any)

_User = User | RpcUser | AnonymousUser | None
_User: TypeAlias = "RequestPrincipal | None"

registry: MutableMapping[Any, Any] = {}

Expand Down
Loading