forked from p15670423/monkey
Common: Rename PydanticEventSerializer -> PydanticAgentEventSerializer
This commit is contained in:
parent
bf5e32a252
commit
43fd978ce4
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue