aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Triguba <eugenetriguba@gmail.com>2023-04-08 00:30:54 -0400
committerEugene Triguba <eugenetriguba@gmail.com>2023-04-08 00:30:54 -0400
commit6ec5acc884abe4da1f8a6bde15e0bf4ff1ec6a46 (patch)
treedfa121218a9a513ea8ee1b9bd548ca9d85406761
parentgh-32: Expose `run` method as a public library API (diff)
downloadtaskipy2-6ec5acc884abe4da1f8a6bde15e0bf4ff1ec6a46.zip
gh-32: Add docstring for public run method
-rwxr-xr-xtaskipy/cli.py10
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]',