diff options
| author | Eugene Triguba <eugenetriguba@gmail.com> | 2023-04-08 00:30:54 -0400 |
|---|---|---|
| committer | Eugene Triguba <eugenetriguba@gmail.com> | 2023-04-08 00:30:54 -0400 |
| commit | 6ec5acc884abe4da1f8a6bde15e0bf4ff1ec6a46 (patch) | |
| tree | dfa121218a9a513ea8ee1b9bd548ca9d85406761 | |
| parent | gh-32: Expose `run` method as a public library API (diff) | |
| download | taskipy2-6ec5acc884abe4da1f8a6bde15e0bf4ff1ec6a46.zip | |
gh-32: Add docstring for public run method
| -rwxr-xr-x | taskipy/cli.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/taskipy/cli.py b/taskipy/cli.py index ec25c55..c1e765b 100755 --- a/taskipy/cli.py +++ b/taskipy/cli.py @@ -13,7 +13,15 @@ def main(): sys.exit(exit_code) -def run(args: List[str]): +def run(args: List[str]) -> int: + """Run the taskipy CLI programmatically. + + Args: + args: The arguments passed to the taskipy CLI. + + Returns: + 0 on success; > 0 for an error. + """ parser = argparse.ArgumentParser( prog='task', description='runs a task specified in your pyproject.toml under [tool.taskipy.tasks]', |