We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
CLI frameworks like Cobra work like this, your params aren't just settable as cli flags, but also in a config file.
It appears pyinvoke separates the two.
I can define cli flags on the individual funcs
@task def show_config(ctx: Context, myflag: str, myotherflag: str):
But "configuration" is an entirely separate thing: https://docs.pyinvoke.org/en/latest/concepts/configuration.html
Is it at all possible to define flags as part of configuration like this:
ns = Collection() col = Collection.from_module("my_module") col.configure({"myflag": "default value", "myotherflag": "default value"}) ns.add_collection(col) @task def show_config(ctx: Context) # Have the decorator magically inject myflag and myotherflag from config
Is there a way I could add this myself if its not supported?
I looks like I can't expand a dict like this right?
d = dict(p1=1, p2=2) @task def my_cmd(ctx: Context, **d):
The text was updated successfully, but these errors were encountered:
No branches or pull requests
CLI frameworks like Cobra work like this, your params aren't just settable as cli flags, but also in a config file.
It appears pyinvoke separates the two.
I can define cli flags on the individual funcs
But "configuration" is an entirely separate thing: https://docs.pyinvoke.org/en/latest/concepts/configuration.html
Is it at all possible to define flags as part of configuration like this:
Is there a way I could add this myself if its not supported?
I looks like I can't expand a dict like this right?
The text was updated successfully, but these errors were encountered: