Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow custom TaskLoader2.load_tasks to consume arguments #442

Open
ktbarrett opened this issue Oct 26, 2022 · 1 comment
Open

Allow custom TaskLoader2.load_tasks to consume arguments #442

ktbarrett opened this issue Oct 26, 2022 · 1 comment

Comments

@ktbarrett
Copy link

ktbarrett commented Oct 26, 2022

From here. The remaining arguments not parsed by the Command are passed to the TaskLoader. This would be a nice opportunity for the TaskLoader to be able to consume/modify arguments before the arguments are parsed by the main program.

Proposal

Allow the result of the TaskLoader2.load_tasks to be either List[Task] or Tuple[List[Task], List[str]] where in the tuple case the second result would be arguments.

Alternatives

Right now it's possible to mutate the passed in the argument list to get the desired effect. That is obviously not intended.

Fund with Polar
@ktbarrett ktbarrett changed the title Allow custom TaskLoader2 to consume arguments Allow custom TaskLoader2.load_tasks to consume arguments Oct 26, 2022
@schettino72
Copy link
Member

@ktbarrett could you please provide an example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants