From 659ea2c30637525b09fa0d14fc4ac4927ba5374c Mon Sep 17 00:00:00 2001 From: northern-64bit <75195383+northern-64bit@users.noreply.github.com> Date: Sun, 19 Feb 2023 22:25:19 +0100 Subject: [PATCH 1/2] Fix help message for stocks menu --- openbb_terminal/stocks/stocks_controller.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openbb_terminal/stocks/stocks_controller.py b/openbb_terminal/stocks/stocks_controller.py index 99642b1e2bb..b5b0db309d9 100644 --- a/openbb_terminal/stocks/stocks_controller.py +++ b/openbb_terminal/stocks/stocks_controller.py @@ -264,7 +264,7 @@ class StocksController(StockBaseController): "--ticker", action="store", dest="s_ticker", - required="-h" not in other_args and not self.ticker, + required=not any(x in other_args for x in ["-h", "--help"]) and not self.ticker, help="Ticker to get data for", ) parser.add_argument( @@ -363,7 +363,7 @@ class StocksController(StockBaseController): help="Ticker to analyze", type=str, default=None, - required="-h" not in other_args and not self.ticker, + required=not any(x in other_args for x in ["-h", "--help"]) and not self.ticker, ) parser.add_argument( "-p", @@ -495,7 +495,7 @@ class StocksController(StockBaseController): "--ticker", action="store", dest="ticker", - required="-h" not in other_args and not self.ticker, + required=not any(x in other_args for x in ["-h", "--help"]) and not self.ticker, help="Ticker to get data for", ) parser.add_argument( From ca67168a475d1948752ac656fbfa0c1ce1a11850 Mon Sep 17 00:00:00 2001 From: northern-64bit <75195383+northern-64bit@users.noreply.github.com> Date: Sun, 19 Feb 2023 22:39:01 +0100 Subject: [PATCH 2/2] Fix linting --- openbb_terminal/stocks/stocks_controller.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/openbb_terminal/stocks/stocks_controller.py b/openbb_terminal/stocks/stocks_controller.py index b5b0db309d9..dd2bfc10f7c 100644 --- a/openbb_terminal/stocks/stocks_controller.py +++ b/openbb_terminal/stocks/stocks_controller.py @@ -264,7 +264,8 @@ class StocksController(StockBaseController): "--ticker", action="store", dest="s_ticker", - required=not any(x in other_args for x in ["-h", "--help"]) and not self.ticker, + required=not any(x in other_args for x in ["-h", "--help"]) + and not self.ticker, help="Ticker to get data for", ) parser.add_argument( @@ -363,7 +364,8 @@ class StocksController(StockBaseController): help="Ticker to analyze", type=str, default=None, - required=not any(x in other_args for x in ["-h", "--help"]) and not self.ticker, + required=not any(x in other_args for x in ["-h", "--help"]) + and not self.ticker, ) parser.add_argument( "-p", @@ -495,7 +497,8 @@ class StocksController(StockBaseController): "--ticker", action="store", dest="ticker", - required=not any(x in other_args for x in ["-h", "--help"]) and not self.ticker, + required=not any(x in other_args for x in ["-h", "--help"]) + and not self.ticker, help="Ticker to get data for", ) parser.add_argument(