Skip to content

Commit 626ec37

Browse files
ref: remove unnecssary metaclass (#91906)
`@Christinarlong` and I found this at pycon <!-- Describe your PR here. -->
1 parent b1ab11d commit 626ec37

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/sentry/hybridcloud/rpc/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import threading
66
from collections.abc import Callable, Iterable, Mapping
77
from enum import Enum
8-
from typing import Any, Generic, Protocol, Self, TypeVar, cast
8+
from typing import Any, Generic, Self, TypeVar, cast
99

1010
import pydantic
1111
from django.db import router, transaction
@@ -99,10 +99,6 @@ def serialize_by_field_name(
9999
return cls(**fields)
100100

101101

102-
class RpcModelProtocolMeta(type(RpcModel), type(Protocol)): # type: ignore[misc]
103-
"""A unifying metaclass for RpcModel classes that also implement a Protocol."""
104-
105-
106102
ServiceInterface = TypeVar("ServiceInterface")
107103

108104

src/sentry/sentry_apps/services/app/model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from pydantic.fields import Field
1313

1414
from sentry.constants import SentryAppInstallationStatus
15-
from sentry.hybridcloud.rpc import RpcModel, RpcModelProtocolMeta
15+
from sentry.hybridcloud.rpc import RpcModel
1616
from sentry.sentry_apps.utils.errors import SentryAppErrorType
1717

1818

@@ -124,7 +124,7 @@ def actionType(self) -> str: ...
124124
def is_enabled(self) -> bool: ...
125125

126126

127-
class RpcSentryAppEventData(RpcModel, metaclass=RpcModelProtocolMeta):
127+
class RpcSentryAppEventData(RpcModel):
128128
id: str = ""
129129
label: str = ""
130130
action_type: str = ""

0 commit comments

Comments
 (0)