From 28d540238f0824b3b91dc876128e76ba7f0a5316 Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Mon, 26 Oct 2020 10:11:52 +0100 Subject: [PATCH] Remove argument reports from hooks related to collect tasks. --- docs/changes.rst | 1 + src/_pytask/collect.py | 4 ++-- src/_pytask/hookspecs.py | 10 +++------- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/docs/changes.rst b/docs/changes.rst index 2dce3630..b411280e 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -15,6 +15,7 @@ all releases are available on `Anaconda.org - :gh:`34` skips ``pytask_collect_task_teardown`` if task is None. - :gh:`35` adds the ability to capture stdout and stderr with the CaptureManager. - :gh:`36` reworks the debugger to make it work with the CaptureManager. +- :gh:`37` removes reports argument from hooks related to task collection. 0.0.8 - 2020-10-04 diff --git a/src/_pytask/collect.py b/src/_pytask/collect.py index a0bdc850..d6de4af0 100644 --- a/src/_pytask/collect.py +++ b/src/_pytask/collect.py @@ -121,11 +121,11 @@ def pytask_collect_file(session, path, reports): @hookimpl -def pytask_collect_task_protocol(session, reports, path, name, obj): +def pytask_collect_task_protocol(session, path, name, obj): """Start protocol for collecting a task.""" try: session.hook.pytask_collect_task_setup( - session=session, reports=reports, path=path, name=name, obj=obj + session=session, path=path, name=name, obj=obj ) task = session.hook.pytask_collect_task( session=session, path=path, name=name, obj=obj diff --git a/src/_pytask/hookspecs.py b/src/_pytask/hookspecs.py index 3c0dd07a..d70d4528 100644 --- a/src/_pytask/hookspecs.py +++ b/src/_pytask/hookspecs.py @@ -134,17 +134,13 @@ def pytask_collect_file(session, path, reports): @hookspec(firstresult=True) -def pytask_collect_task_protocol(session, reports, path, name, obj): +def pytask_collect_task_protocol(session, path, name, obj): """Start protocol to collect tasks.""" @hookspec -def pytask_collect_task_setup(session, reports, path, name, obj): - """Steps before collecting a task. - - For example, an error can be raised if two tasks with the same name are collected. - - """ +def pytask_collect_task_setup(session, path, name, obj): + """Steps before collecting a task.""" @hookspec(firstresult=True)