From 318d9ad1a4679832b380c77ab1a0a86684f686f2 Mon Sep 17 00:00:00 2001 From: Cody Logan Date: Fri, 1 Dec 2023 15:33:21 -0800 Subject: Switch to Google-style docstrings for readability The previous Sphinx-style docstrings could be hard to read at a glance when formatted with pydoc. --- src/wikiget/wikiget.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/wikiget/wikiget.py') diff --git a/src/wikiget/wikiget.py b/src/wikiget/wikiget.py index 0a6478e..eefd14b 100644 --- a/src/wikiget/wikiget.py +++ b/src/wikiget/wikiget.py @@ -31,10 +31,11 @@ from wikiget.logging import configure_logging def parse_args(argv: list[str]) -> argparse.Namespace: """Parse the given argument list. - :param argv: a list of arguments in string form - :type argv: list[str] - :return: a Namespace containing the arguments and their values - :rtype: argparse.Namespace + Args: + argv (list[str]): a list of arguments in string form + + Returns: + argparse.Namespace: a Namespace containing the arguments and their values """ parser = argparse.ArgumentParser( description=""" @@ -130,7 +131,11 @@ def parse_args(argv: list[str]) -> argparse.Namespace: def cli() -> int: - """Set up the command-line environment and start the download process.""" + """Set up the command-line environment and start the download process. + + Returns: + int: exit code (0 for success, 1 for errors, 130 for user interrupt) + """ args = parse_args(sys.argv[1:]) configure_logging(verbosity=args.verbose, logfile=args.logfile, quiet=args.quiet) -- cgit v1.2.3