Coverage for src/kwai/core/events/subscriber.py: 100%

3 statements  

« prev     ^ index     » next       coverage.py v7.6.10, created at 2024-01-01 00:00 +0000

1"""Module for defining an interface for a subscriber.""" 

2 

3from abc import ABC, abstractmethod 

4 

5from kwai.core.events.event_router import EventRouter 

6 

7 

8class Subscriber(ABC): 

9 """Interface for a subscriber.""" 

10 

11 @abstractmethod 

12 def subscribe(self, event: EventRouter) -> None: 

13 """Subscribe to an event with the given task."""