diff options
author | Olly Cope <olly@ollycope.com> | 2022-11-03 10:47:05 +0000 |
---|---|---|
committer | Olly Cope <olly@ollycope.com> | 2022-11-03 10:47:05 +0000 |
commit | 140ee7f6135e2c65f9dc4d56aa3ac269684a1af2 (patch) | |
tree | a18a75008def89b00c8eb74ff67c363dc4acc5bd | |
parent | 0a886d90b28678a43b8728cb330d6774c2c36e1e (diff) | |
download | yoyo-140ee7f6135e2c65f9dc4d56aa3ac269684a1af2.tar.gz |
scripts/main: add missing type hints, fix inaccurate docstring
-rwxr-xr-x | yoyo/scripts/main.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/yoyo/scripts/main.py b/yoyo/scripts/main.py index fc729b4..7ae7fed 100755 --- a/yoyo/scripts/main.py +++ b/yoyo/scripts/main.py @@ -18,6 +18,7 @@ import configparser import logging import os import sys +import typing as t from yoyo import connections from yoyo import default_migration_table @@ -46,11 +47,13 @@ class InvalidArgument(Exception): pass -def parse_args(argv=None): +def parse_args( + argv=None, +) -> t.Tuple[configparser.ConfigParser, argparse.ArgumentParser, argparse.Namespace]: """ Parse the config file and command line args. - :return: tuple of (argparser, parsed_args) + :return: tuple of ``(parsed config file, argument parser, parsed arguments)`` """ #: List of arguments whose defaults should be read from the config file config_args = { |