Skip to content

Commit

Permalink
fixup: use Path, not str for path of task
Browse files Browse the repository at this point in the history
  • Loading branch information
NickCrews committed Dec 5, 2023
1 parent e643366 commit b33aa4b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/_pytask/task_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ def wrapper(func: Callable[..., Any]) -> Callable[..., Any]:
# Based on https://stackoverflow.com/questions/1095543/get-name-of-calling-functions-module-in-python # noqa: E501
frm = inspect.stack()[1]
task_module = inspect.getmodule(frm.frame)
COLLECTED_TASKS[task_module.__file__].append(unwrapped)
task_path = Path(task_module.__file__)
COLLECTED_TASKS[task_path].append(unwrapped)

return unwrapped

Expand Down

0 comments on commit b33aa4b

Please sign in to comment.