From f82026a5faa538f47fa6482fa6d5cfdf9a2d43f7 Mon Sep 17 00:00:00 2001 From: Nat Noordanus Date: Sun, 24 Nov 2024 20:03:16 +0100 Subject: [PATCH] feat: Explicitly disallow capture_stdout option on sequence tasks --- docs/tasks/task_types/sequence.rst | 2 +- poethepoet/task/sequence.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/tasks/task_types/sequence.rst b/docs/tasks/task_types/sequence.rst index a125d2244..0bb1861ca 100644 --- a/docs/tasks/task_types/sequence.rst +++ b/docs/tasks/task_types/sequence.rst @@ -24,7 +24,7 @@ By default the contents of the array are interpreted as references to other task Available task options ---------------------- -``sequence`` tasks support all of the :doc:`standard task options <../options>` with the exception of ``use_exec``. +``sequence`` tasks support all of the :doc:`standard task options <../options>` with the exception of ``use_exec`` and ``capture_stdout``. The following options are also accepted: diff --git a/poethepoet/task/sequence.py b/poethepoet/task/sequence.py index 4121268ea..fb7a3f096 100644 --- a/poethepoet/task/sequence.py +++ b/poethepoet/task/sequence.py @@ -37,6 +37,10 @@ def validate(self): "Unsupported value for option `default_item_type`,\n" f"Expected one of {PoeTask.get_task_types(content_type=str)}" ) + if self.capture_stdout is not None: + raise ConfigValidationError( + "Unsupported option for sequence task `capture_stdout`" + ) class TaskSpec(PoeTask.TaskSpec): content: list