mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 16:48:30 +00:00
Improve type hinting for TaskCompletedEvent handler
- Add explicit type annotation for TaskCompletedEvent in event_listener.py - Enhance type safety for event handling in EventListener
This commit is contained in:
@@ -140,7 +140,7 @@ class EventListener(BaseEventListener):
|
||||
)
|
||||
|
||||
@crewai_event_bus.on(TaskCompletedEvent)
|
||||
def on_task_completed(source, event):
|
||||
def on_task_completed(source, event: TaskCompletedEvent):
|
||||
if source._execution_span:
|
||||
self._telemetry.task_ended(
|
||||
source._execution_span, source, source.agent.crew
|
||||
|
||||
Reference in New Issue
Block a user