Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ all releases are available on `Anaconda.org <https://anaconda.org/pytask/pytask>
- :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
Expand Down
4 changes: 2 additions & 2 deletions src/_pytask/collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 3 additions & 7 deletions src/_pytask/hookspecs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down