@@ -724,33 +724,33 @@ def task_capture(self, when: str, task: PTask) -> Generator[None, None, None]:
724
724
finally :
725
725
self .suspend (in_ = False )
726
726
727
- out , err = self .read ()
728
- if out :
729
- task .report_sections .append ((when , "stdout" , out ))
730
- if err :
731
- task .report_sections .append ((when , "stderr" , err ))
727
+ out , err = self .read ()
728
+ if out :
729
+ task .report_sections .append ((when , "stdout" , out ))
730
+ if err :
731
+ task .report_sections .append ((when , "stderr" , err ))
732
732
733
733
# Hooks
734
734
735
- @hookimpl (hookwrapper = True )
735
+ @hookimpl (wrapper = True )
736
736
def pytask_execute_task_setup (self , task : PTask ) -> Generator [None , None , None ]:
737
737
"""Capture output during setup."""
738
738
with self .task_capture ("setup" , task ):
739
- yield
739
+ return ( yield )
740
740
741
- @hookimpl (hookwrapper = True )
741
+ @hookimpl (wrapper = True )
742
742
def pytask_execute_task (self , task : PTask ) -> Generator [None , None , None ]:
743
743
"""Capture output during execution."""
744
744
with self .task_capture ("call" , task ):
745
- yield
745
+ return ( yield )
746
746
747
- @hookimpl (hookwrapper = True )
747
+ @hookimpl (wrapper = True )
748
748
def pytask_execute_task_teardown (self , task : PTask ) -> Generator [None , None , None ]:
749
749
"""Capture output during teardown."""
750
750
with self .task_capture ("teardown" , task ):
751
- yield
751
+ return ( yield )
752
752
753
- @hookimpl (hookwrapper = True )
753
+ @hookimpl (wrapper = True )
754
754
def pytask_collect_log (self ) -> Generator [None , None , None ]:
755
755
"""Suspend capturing at the end of the collection.
756
756
@@ -763,4 +763,4 @@ def pytask_collect_log(self) -> Generator[None, None, None]:
763
763
764
764
"""
765
765
self .suspend (in_ = True )
766
- yield
766
+ return ( yield )
0 commit comments