From f247b6da347971799d73e926eb4e5b7cf57206a2 Mon Sep 17 00:00:00 2001 From: Joseph Walker Date: Fri, 10 Feb 2023 11:51:38 -0500 Subject: [PATCH] Remove export_to_file flag for redundancy --- openbb_terminal/stocks/stocks_helper.py | 18 +++++++----------- website/content/sdk/reference/stocks/search.md | 3 +-- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/openbb_terminal/stocks/stocks_helper.py b/openbb_terminal/stocks/stocks_helper.py index 5d50cf664bb..58ce3b4b185 100644 --- a/openbb_terminal/stocks/stocks_helper.py +++ b/openbb_terminal/stocks/stocks_helper.py @@ -106,7 +106,6 @@ def search( limit: int = 0, export: str = "", sheet_name: Optional[str] = "", - export_to_file: bool = True, ) -> Optional[pd.DataFrame]: """Search selected query for tickers. @@ -128,8 +127,6 @@ def search( The limit of companies shown. export : str Export data - export_to_file : bool - Whether results should be exported to file or not. Returns ------- @@ -230,14 +227,13 @@ def search( headers=["Name", "Country", "Sector", "Industry", "Exchange"], title=title, ) - if export_to_file: - export_data( - export, - os.path.dirname(os.path.abspath(__file__)), - "search", - df, - sheet_name, - ) + export_data( + export, + os.path.dirname(os.path.abspath(__file__)), + "search", + df, + sheet_name, + ) return df diff --git a/website/content/sdk/reference/stocks/search.md b/website/content/sdk/reference/stocks/search.md index 2b7de17c21b..6faca1bba8e 100644 --- a/website/content/sdk/reference/stocks/search.md +++ b/website/content/sdk/reference/stocks/search.md @@ -10,7 +10,7 @@ Search selected query for tickers. Source Code: [[link](https://github.com/OpenBB-finance/OpenBBTerminal/tree/main/openbb_terminal/stocks/stocks_helper.py#L98)] ```python -openbb.stocks.search(query: str = "", country: str = "", sector: str = "", industry: str = "", exchange_country: str = "", limit: int = 0, export: str = "", sheet_name: Optional[str] = "", export_to_file: bool = True) +openbb.stocks.search(query: str = "", country: str = "", sector: str = "", industry: str = "", exchange_country: str = "", limit: int = 0, export: str = "", sheet_name: Optional[str] = "") ``` --- @@ -27,7 +27,6 @@ openbb.stocks.search(query: str = "", country: str = "", sector: str = "", indus | limit | int | The limit of companies shown. | 0 | True | | export | str | Export data | | True | | sheet_name | str | Sheet Name | | True | -| export_to_file | bool | Whether results should be exported to file or not. | | True | ---