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
PLEASE DO NOT USE ISSUE TRACKER TO ASK QUESTIONS: see contributing Assume I have a foo task depends upon the bar task. I want to pass the argument verbose to the bar. How could I achieve that? I read the article https://stackoverflow.com/questions/34957460/python-doit-use-arguments-in-dependent-tasks, but I still need to get how to save the argument.
def show_args(verbose=0): print(f'{verbose}')
def save_arg(verbose): return {'verbose': verbose}
def task_bar(): return {'actions': [show_args], # 'getargs': {'verbose':('foo', 'verbose')}, #it will introduce cyclic dependencies** 'verbosity': 2, }
def task_foo(): return {'actions': [save_arg], 'verbosity': 2, 'params': [ { 'name': 'verbose', 'long': 'verbose', 'short': 'v', 'type': bool, 'default': False, },], 'task_dep':['bar'], }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
PLEASE DO NOT USE ISSUE TRACKER TO ASK QUESTIONS: see contributing
Assume I have a foo task depends upon the bar task. I want to pass the argument verbose to the bar. How could I achieve that?
I read the article https://stackoverflow.com/questions/34957460/python-doit-use-arguments-in-dependent-tasks, but I still need to get how to save the argument.
def show_args(verbose=0):
print(f'{verbose}')
def save_arg(verbose):
return {'verbose': verbose}
def task_bar():
return {'actions': [show_args],
# 'getargs': {'verbose':('foo', 'verbose')}, #it will introduce cyclic dependencies**
'verbosity': 2,
}
def task_foo():
return {'actions': [save_arg],
'verbosity': 2,
'params': [
{
'name': 'verbose',
'long': 'verbose',
'short': 'v',
'type': bool,
'default': False,
},],
'task_dep':['bar'],
}
The text was updated successfully, but these errors were encountered: