diff --git a/tests/ticker.py b/tests/ticker.py index e0760b4f7..20c5e6b0f 100644 --- a/tests/ticker.py +++ b/tests/ticker.py @@ -713,8 +713,6 @@ def test_recommendations_history(self): # alias for upgrades_downgrades def test_calendar(self): data = self.ticker.calendar - print(self.ticker.ticker) - print(data) self.assertIsInstance(data, dict, "data has wrong type") self.assertTrue(len(data) > 0, "data is empty") self.assertIn("Earnings Date", data.keys(), "data missing expected key") diff --git a/yfinance/scrapers/quote.py b/yfinance/scrapers/quote.py index 646d4afa6..f06c2a5c2 100644 --- a/yfinance/scrapers/quote.py +++ b/yfinance/scrapers/quote.py @@ -730,7 +730,7 @@ def _fetch_calendar(self): # secFilings return too old data, so not requesting it for now result = self._fetch(self.proxy, modules=['calendarEvents']) try: - self._calendar = {} + self._calendar = dict() _events = result["quoteSummary"]["result"][0]["calendarEvents"] if 'dividendDate' in _events: self._calendar['Dividend Date'] = datetime.datetime.fromtimestamp(_events['dividendDate']).date()