From 6ec5acc884abe4da1f8a6bde15e0bf4ff1ec6a46 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sat, 8 Apr 2023 00:30:54 -0400 Subject: gh-32: Add docstring for public run method --- taskipy/cli.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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]', -- cgit v1.2.3