Common: Rename PydanticEventSerializer -> PydanticAgentEventSerializer

This commit is contained in:
Shreya Malviya 2022-09-16 12:39:02 +05:30 committed by Mike Salvatore
parent bf5e32a252
commit 43fd978ce4
3 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
from .consts import EVENT_TYPE_FIELD
from .i_agent_event_serializer import IAgentEventSerializer, JSONSerializable
from .agent_event_serializer_registry import AgentEventSerializerRegistry
from .pydantic_event_serializer import PydanticEventSerializer
from .pydantic_event_serializer import PydanticAgentEventSerializer
from .register import register_common_agent_event_serializers

View File

@ -11,7 +11,7 @@ logger = logging.getLogger(__name__)
T = TypeVar("T", bound=AbstractAgentEvent)
class PydanticEventSerializer(IAgentEventSerializer, Generic[T]):
class PydanticAgentEventSerializer(IAgentEventSerializer, Generic[T]):
def __init__(self, event_class: Type[T]):
self._event_class = event_class

View File

@ -1,11 +1,11 @@
from common.events import CredentialsStolenEvent
from . import AgentEventSerializerRegistry, PydanticEventSerializer
from . import AgentEventSerializerRegistry, PydanticAgentEventSerializer
def register_common_agent_event_serializers(
event_serializer_registry: AgentEventSerializerRegistry,
):
event_serializer_registry[CredentialsStolenEvent] = PydanticEventSerializer(
event_serializer_registry[CredentialsStolenEvent] = PydanticAgentEventSerializer(
CredentialsStolenEvent
)