From d72f5a601e31549c8ba6961007b210bf45ae6e86 Mon Sep 17 00:00:00 2001 From: Brandon Hancock Date: Mon, 29 Jul 2024 16:22:52 -0400 Subject: [PATCH] Add missing doc string --- src/crewai/pipeline/pipeline.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/crewai/pipeline/pipeline.py b/src/crewai/pipeline/pipeline.py index d6eb0f6f5..816db0e66 100644 --- a/src/crewai/pipeline/pipeline.py +++ b/src/crewai/pipeline/pipeline.py @@ -391,6 +391,15 @@ class Pipeline(BaseModel): return [crew_outputs + [output] for output in all_stage_outputs[-1]] def __rshift__(self, other: PipelineStage) -> Pipeline: + """ + Implements the >> operator to add another Stage (Crew or List[Crew]) to an existing Pipeline. + + Args: + other (Any): The stage to add. + + Returns: + Pipeline: A new pipeline with the added stage. + """ if isinstance(other, (Crew, Pipeline, PipelineRouter)): return type(self)(stages=self.stages + [other]) elif isinstance(other, list) and all(isinstance(crew, Crew) for crew in other):