aboutsummaryrefslogtreecommitdiff
path: root/src/wikiget/wikiget.py
diff options
context:
space:
mode:
authorCody Logan <cody@lokken.dev>2023-12-01 15:33:21 -0800
committerCody Logan <cody@lokken.dev>2023-12-01 15:33:21 -0800
commit318d9ad1a4679832b380c77ab1a0a86684f686f2 (patch)
treeee1bd8ad347c18b3fc44da388360634c3afd231c /src/wikiget/wikiget.py
parent488e859f8c343b0ef25db379b6339bf82769514b (diff)
downloadwikiget-318d9ad1a4679832b380c77ab1a0a86684f686f2.tar.gz
wikiget-318d9ad1a4679832b380c77ab1a0a86684f686f2.zip
Switch to Google-style docstrings for readability
The previous Sphinx-style docstrings could be hard to read at a glance when formatted with pydoc.
Diffstat (limited to 'src/wikiget/wikiget.py')
-rw-r--r--src/wikiget/wikiget.py15
1 files changed, 10 insertions, 5 deletions
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)