Skip to content

Commit 1d7e1ac

Browse files
authored
Remove argument reports from hooks related to collect tasks. (#37)
1 parent d0fc5c9 commit 1d7e1ac

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

docs/changes.rst

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ all releases are available on `Anaconda.org <https://anaconda.org/pytask/pytask>
1515
- :gh:`34` skips ``pytask_collect_task_teardown`` if task is None.
1616
- :gh:`35` adds the ability to capture stdout and stderr with the CaptureManager.
1717
- :gh:`36` reworks the debugger to make it work with the CaptureManager.
18+
- :gh:`37` removes reports argument from hooks related to task collection.
1819

1920

2021
0.0.8 - 2020-10-04

src/_pytask/collect.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,11 @@ def pytask_collect_file(session, path, reports):
121121

122122

123123
@hookimpl
124-
def pytask_collect_task_protocol(session, reports, path, name, obj):
124+
def pytask_collect_task_protocol(session, path, name, obj):
125125
"""Start protocol for collecting a task."""
126126
try:
127127
session.hook.pytask_collect_task_setup(
128-
session=session, reports=reports, path=path, name=name, obj=obj
128+
session=session, path=path, name=name, obj=obj
129129
)
130130
task = session.hook.pytask_collect_task(
131131
session=session, path=path, name=name, obj=obj

src/_pytask/hookspecs.py

+3-7
Original file line numberDiff line numberDiff line change
@@ -134,17 +134,13 @@ def pytask_collect_file(session, path, reports):
134134

135135

136136
@hookspec(firstresult=True)
137-
def pytask_collect_task_protocol(session, reports, path, name, obj):
137+
def pytask_collect_task_protocol(session, path, name, obj):
138138
"""Start protocol to collect tasks."""
139139

140140

141141
@hookspec
142-
def pytask_collect_task_setup(session, reports, path, name, obj):
143-
"""Steps before collecting a task.
144-
145-
For example, an error can be raised if two tasks with the same name are collected.
146-
147-
"""
142+
def pytask_collect_task_setup(session, path, name, obj):
143+
"""Steps before collecting a task."""
148144

149145

150146
@hookspec(firstresult=True)

0 commit comments

Comments
 (0)