Closed
Description
- I have checked that this issue has not already been reported.
- I have confirmed this bug exists on the latest version of pytask.
- (optional) I have confirmed this bug exists on the
main
branch of pytask.
Problem description
First of all, thanks for this library! A lot of great stuff in here.
See #373 for a PR that adds a failing test.
While I'm not sure what the root cause is / who's fault it is, the actual method of failure is something like this:
Say I have a file task_a.py
. In
Lines 108 to 120 in 9b2d93e
path.stem
, so in my case it is task_a
. But then IFF you have used a from __future__ import annotations
, then you go down this code path where dataclasses tries to call sys.modules.get("task_a")
, and "task_a" is not importable by itself.
I think we need to be setting the module.name to something else, so it actually is findable within sys.modules, or import/exec it slightly differently?