From cbc2f0c6572ff61d752aa773c3221828387c13ed Mon Sep 17 00:00:00 2001 From: didier Date: Sun, 7 Mar 2021 10:49:53 +0000 Subject: [PATCH 1/4] #124 Remove -t flag requirement from load command --- terminal.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/terminal.py b/terminal.py index 397cebe2a4d..9e67462cb26 100644 --- a/terminal.py +++ b/terminal.py @@ -56,6 +56,11 @@ def load(l_args, s_ticker, s_start, s_interval, df_stock): ) try: + # For the case where a user uses: 'load BB' + if l_args: + if "-" not in l_args[0]: + l_args.insert(0, "-t") + ns_parser = parse_known_args_and_warn(parser, l_args) except SystemExit: From d149b56bc4e4ef0168d074f42c0749679fbe87b3 Mon Sep 17 00:00:00 2001 From: DidierRLopes Date: Sun, 7 Mar 2021 13:22:04 +0000 Subject: [PATCH 2/4] Update terminal.py --- terminal.py | 1 + 1 file changed, 1 insertion(+) diff --git a/terminal.py b/terminal.py index 9c4b327a591..f61d9121061 100644 --- a/terminal.py +++ b/terminal.py @@ -19,6 +19,7 @@ from gamestonk_terminal import config_terminal as cfg # import warnings # warnings.simplefilter("always") + # pylint: disable=too-many-branches def main(): """ From 96801999a14b1630136bb89b960ae4c8722cb011 Mon Sep 17 00:00:00 2001 From: DidierRLopes Date: Sun, 7 Mar 2021 13:22:51 +0000 Subject: [PATCH 3/4] Update main_helper.py --- gamestonk_terminal/main_helper.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gamestonk_terminal/main_helper.py b/gamestonk_terminal/main_helper.py index 1818d1712aa..553f8acbaf2 100644 --- a/gamestonk_terminal/main_helper.py +++ b/gamestonk_terminal/main_helper.py @@ -111,6 +111,11 @@ def load(l_args, s_ticker, s_start, s_interval, df_stock): ) try: + # For the case where a user uses: 'load BB' + if l_args: + if "-" not in l_args[0]: + l_args.insert(0, "-t") + ns_parser = parse_known_args_and_warn(parser, l_args) except SystemExit: From 7f1ccbfd28bd784a966f0fecbbe6ca5dd310792d Mon Sep 17 00:00:00 2001 From: didier Date: Sun, 7 Mar 2021 13:28:27 +0000 Subject: [PATCH 4/4] make lint happy --- gamestonk_terminal/main_helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gamestonk_terminal/main_helper.py b/gamestonk_terminal/main_helper.py index 553f8acbaf2..0f6e81e4fd7 100644 --- a/gamestonk_terminal/main_helper.py +++ b/gamestonk_terminal/main_helper.py @@ -115,7 +115,7 @@ def load(l_args, s_ticker, s_start, s_interval, df_stock): if l_args: if "-" not in l_args[0]: l_args.insert(0, "-t") - + ns_parser = parse_known_args_and_warn(parser, l_args) except SystemExit: