@@ -62,7 +62,7 @@ class Options(_OptionBaseReader):
6262 >>> all_data = aapl.get_all_data()
6363 """
6464
65- _OPTIONS_BASE_URL = "https://query1.finance.yahoo.com/" " v7/finance/options/{sym}"
65+ _OPTIONS_BASE_URL = "https://query1.finance.yahoo.com/v7/finance/options/{sym}"
6666
6767 def get_options_data (self , month = None , year = None , expiry = None ):
6868 """
@@ -144,7 +144,7 @@ def _option_from_url(self, url):
144144 puts = result ["options" ]["puts" ]
145145 except IndexError as exc :
146146 raise RemoteDataError (
147- "Option json not available " " for url: %s" % url
147+ "Option json not available for url: %s" % url
148148 ) from exc
149149
150150 self .underlying_price = (
@@ -479,7 +479,7 @@ def _try_parse_dates(self, year, month, expiry):
479479 if expiry .year == year and expiry .month == month
480480 ]
481481 if len (expiry ) == 0 :
482- raise ValueError ("No expiries available " " in %s-%s" % (year , month ))
482+ raise ValueError ("No expiries available in {}-{}" . format (year , month ))
483483
484484 return expiry
485485
@@ -707,7 +707,7 @@ def _parse_url(self, url):
707707 jd = json .loads (self ._read_url_as_StringIO (url ).read ())
708708 if jd is None : # pragma: no cover
709709 raise RemoteDataError (
710- "Parsed URL {!r} is not " " a valid json object". format ( url )
710+ f "Parsed URL { url !r} is not a valid json object"
711711 )
712712 return jd
713713
0 commit comments