Remove export_to_file flag for redundancy

This commit is contained in:
Joseph Walker
2023-02-10 11:51:38 -05:00
parent 06b919630e
commit f247b6da34
2 changed files with 8 additions and 13 deletions

View File

@@ -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

View File

@@ -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 |
---