def _make_requires_info(requires):
if isinstance(requires, TaskOnKart):
return RequiredTask(name=requires.__class__.__name__, unique_id=requires.make_unique_id())
if isinstance(requires, dict):
return {key: _make_requires_info(requires=item) for key, item in requires.items()}
if isinstance(requires, Iterable):
return [_make_requires_info(requires=item) for item in requires]
Problem
With generator-style requirements,
we found this error when we use
gokart.tree.task_info.make_task_info_as_tree_str
Possible solution
Change this line to accept typing.Iterable
https://github.com/m3dev/gokart/blob/429af998e621b12dd119e04e839468f6ad902996/gokart/tree/task_info_formatter.py#L53