Skip to content

Commit 5edab33

Browse files
committed
Capture yahooquery FutureWarning
Captures `FutureWarning` raised by `yahooquery` whilst fix pending merging and release (dpguthrie/yahooquery#262).
1 parent 085babd commit 5edab33

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/market_prices/prices/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3764,7 +3764,7 @@ def get(
37643764
excluded. If passed, do not pass `exclude`.
37653765
37663766
exclude : list[str] | str | None
3767-
Symbol or symbols to include. All other symbols will be
3767+
Symbol or symbols to exclude. All other symbols will be
37683768
included. If passed, do not pass `include`.
37693769
37703770
side : Literal['left', 'right'] | None, default: None

src/market_prices/prices/yahoo.py

+8
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@
2424
ERROR404 = {"error": "HTTP 404 Not Found. Please try again"}
2525

2626

27+
# TODO remove when FutureWarning fixed on yahooquery, for example if
28+
# https://github.com/dpguthrie/yahooquery/pull/262 is merged and inlcuded to a release
29+
warnings.filterwarnings(
30+
"ignore", "A value is trying to be set on a copy of a DataFrame", FutureWarning
31+
)
32+
warnings.filterwarnings("ignore", "'S' is deprecated", FutureWarning)
33+
34+
2735
class YahooAPIError(errors.APIError):
2836
"""A Yahoo API endpoint is not available."""
2937

0 commit comments

Comments
 (0)