@@ -62,7 +62,7 @@ class Options(_OptionBaseReader):
62
62
>>> all_data = aapl.get_all_data()
63
63
"""
64
64
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}"
66
66
67
67
def get_options_data (self , month = None , year = None , expiry = None ):
68
68
"""
@@ -144,7 +144,7 @@ def _option_from_url(self, url):
144
144
puts = result ["options" ]["puts" ]
145
145
except IndexError as exc :
146
146
raise RemoteDataError (
147
- "Option json not available " " for url: %s" % url
147
+ "Option json not available for url: %s" % url
148
148
) from exc
149
149
150
150
self .underlying_price = (
@@ -479,7 +479,7 @@ def _try_parse_dates(self, year, month, expiry):
479
479
if expiry .year == year and expiry .month == month
480
480
]
481
481
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 ))
483
483
484
484
return expiry
485
485
@@ -707,7 +707,7 @@ def _parse_url(self, url):
707
707
jd = json .loads (self ._read_url_as_StringIO (url ).read ())
708
708
if jd is None : # pragma: no cover
709
709
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"
711
711
)
712
712
return jd
713
713
0 commit comments