|
14 | 14 | from _pytask.config import hookimpl
|
15 | 15 | from _pytask.mark import Mark
|
16 | 16 | from _pytask.mark_utils import get_specific_markers_from_task
|
17 |
| -from _pytask.mark_utils import has_marker |
18 | 17 | from _pytask.nodes import _collect_nodes
|
19 | 18 | from _pytask.nodes import FilePathNode
|
20 |
| -from _pytask.nodes import PythonFunctionTask |
21 | 19 | from _pytask.parametrize import _copy_func
|
22 | 20 | from pytask_latex import compilation_steps as cs
|
23 | 21 | from pytask_latex.utils import to_list
|
@@ -91,23 +89,6 @@ def compile_latex_document(compilation_steps, path_to_tex, path_to_document):
|
91 | 89 | raise RuntimeError(f"Compilation step {step.__name__} failed.") from e
|
92 | 90 |
|
93 | 91 |
|
94 |
| -@hookimpl |
95 |
| -def pytask_collect_task(session, path, name, obj): |
96 |
| - """Collect a task which is a function. |
97 |
| -
|
98 |
| - There is some discussion on how to detect functions in this `thread |
99 |
| - <https://stackoverflow.com/q/624926/7523785>`_. :class:`types.FunctionType` does not |
100 |
| - detect built-ins which is not possible anyway. |
101 |
| -
|
102 |
| - """ |
103 |
| - if name.startswith("task_") and callable(obj) and has_marker(obj, "latex"): |
104 |
| - task = PythonFunctionTask.from_path_name_function_session( |
105 |
| - path, name, obj, session |
106 |
| - ) |
107 |
| - |
108 |
| - return task |
109 |
| - |
110 |
| - |
111 | 92 | @hookimpl
|
112 | 93 | def pytask_collect_task_teardown(session, task):
|
113 | 94 | """Perform some checks."""
|
|
0 commit comments