Skip to content

Commit

Permalink
Fix 'fast_info deprecated' msg appearing at Ticker() init
Browse files Browse the repository at this point in the history
  • Loading branch information
ValueRaider committed Apr 9, 2023
1 parent 4152f7c commit d45bed3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion yfinance/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def __init__(self, ticker, session=None):
self._quote = Quote(self._data)
self._fundamentals = Fundamentals(self._data)

self._fast_info = FastInfo(self)
self._fast_info = None

def stats(self, proxy=None):
ticker_url = "{}/{}".format(self._scrape_url, self.ticker)
Expand Down Expand Up @@ -1022,6 +1022,8 @@ def get_info(self, proxy=None) -> dict:

@property
def fast_info(self):
if self._fast_info is None:
self._fast_info = FastInfo(self)
return self._fast_info

@property
Expand Down

0 comments on commit d45bed3

Please sign in to comment.