Skip to content

Commit 86ec51f

Browse files
authored
Merge pull request #878 from bashtage/update-black
MAINT: Update black
2 parents ea548e2 + 3458fda commit 86ec51f

File tree

11 files changed

+46
-46
lines changed

11 files changed

+46
-46
lines changed

pandas_datareader/av/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def __init__(
5050

5151
@property
5252
def url(self):
53-
""" API URL """
53+
"""API URL"""
5454
return AV_BASE_URL
5555

5656
@property
@@ -59,12 +59,12 @@ def params(self):
5959

6060
@property
6161
def function(self):
62-
""" Alpha Vantage endpoint function"""
62+
"""Alpha Vantage endpoint function"""
6363
raise NotImplementedError
6464

6565
@property
6666
def data_key(self):
67-
""" Key of data returned from Alpha Vantage """
67+
"""Key of data returned from Alpha Vantage"""
6868
raise NotImplementedError
6969

7070
def _read_lines(self, out):

pandas_datareader/av/time_series.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def forex(self):
8484

8585
@property
8686
def output_size(self):
87-
""" Used to limit the size of the Alpha Vantage query when
87+
"""Used to limit the size of the Alpha Vantage query when
8888
possible.
8989
"""
9090
delta = dt.datetime.now() - self.start

pandas_datareader/base.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def read(self):
102102
self.close()
103103

104104
def _read_one_data(self, url, params):
105-
""" read one data from specified URL """
105+
"""read one data from specified URL"""
106106
if self._format == "string":
107107
out = self._read_url_as_StringIO(url, params=params)
108108
elif self._format == "json":
@@ -139,7 +139,7 @@ def _sanitize_response(response):
139139
return response.content
140140

141141
def _get_response(self, url, params=None, headers=None):
142-
""" send raw HTTP request to get requests.Response from the specified url
142+
"""send raw HTTP request to get requests.Response from the specified url
143143
Parameters
144144
----------
145145
url : str
@@ -181,7 +181,7 @@ def _get_response(self, url, params=None, headers=None):
181181
raise RemoteDataError(msg)
182182

183183
def _get_crumb(self, *args):
184-
""" To be implemented by subclass """
184+
"""To be implemented by subclass"""
185185
raise NotImplementedError("Subclass has not implemented method.")
186186

187187
def _output_error(self, out):
@@ -221,7 +221,7 @@ def _read_lines(self, out):
221221

222222

223223
class _DailyBaseReader(_BaseReader):
224-
""" Base class for Google / Yahoo daily reader """
224+
"""Base class for Google / Yahoo daily reader"""
225225

226226
def __init__(
227227
self,
@@ -302,7 +302,7 @@ def _in_chunks(seq, size):
302302

303303
class _OptionBaseReader(_BaseReader):
304304
def __init__(self, symbol, session=None):
305-
""" Instantiates options_data with a ticker saved as symbol """
305+
"""Instantiates options_data with a ticker saved as symbol"""
306306
self.symbol = symbol.upper()
307307
super(_OptionBaseReader, self).__init__(symbols=symbol, session=session)
308308

pandas_datareader/enigma.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def get_current_snapshot_id(self, dataset_id):
123123

124124
def get_dataset_metadata(self, dataset_id):
125125
"""Get the Dataset Model of this EnigmaReader's dataset
126-
https://docs.public.enigma.com/resources/dataset/index.html
126+
https://docs.public.enigma.com/resources/dataset/index.html
127127
"""
128128
url = "datasets/{0}?row_limit=0".format(dataset_id)
129129
response = self._get(url)

pandas_datareader/io/sdmx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def _read_sdmx_dsd(path_or_buf):
234234

235235

236236
def _read_zipped_sdmx(path_or_buf):
237-
""" Unzipp data contains SDMX-XML """
237+
"""Unzipp data contains SDMX-XML"""
238238
data = _read_content(path_or_buf)
239239

240240
zp = BytesIO()

pandas_datareader/oecd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def url(self):
2222
return "{0}/{1}/all/all?".format(url, self.symbols)
2323

2424
def _read_lines(self, out):
25-
""" read one data from specified URL """
25+
"""read one data from specified URL"""
2626
df = read_jsdmx(out)
2727
try:
2828
idx_name = df.index.name # hack for pandas 0.16.2

pandas_datareader/tiingo.py

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -25,34 +25,34 @@ def get_tiingo_symbols():
2525

2626
class TiingoIEXHistoricalReader(_BaseReader):
2727
"""
28-
Historical data from Tiingo on equities, ETFs and mutual funds,
29-
with re-sampling capability. This query is limited to the last
30-
1,000 bars based in the endDate. So the startDate is moved if
31-
it goes past the limit.
32-
33-
Parameters
34-
----------
35-
symbols : {str, List[str]}
36-
String symbol or list of symbols
37-
start : string, int, date, datetime, Timestamp
38-
Starting date. Parses many different kind of date
39-
representations (e.g., 'JAN-01-2010', '1/1/10', 'Jan, 1, 1980'). Defaults to
40-
20 years before current date.
41-
end : string, int, date, datetime, Timestamp
42-
Ending date
43-
retry_count : int, default 3
44-
Number of times to retry query request.
45-
pause : float, default 0.1
46-
Time, in seconds, of the pause between retries.
47-
session : Session, default None
48-
requests.sessions.Session instance to be used
49-
freq : {str, None}
50-
Re-sample frequency. Format is # + (min/hour); e.g. "15min" or "4hour".
51-
If no value is provided, defaults to 5min. The minimum value is "1min".
52-
Units in minutes (min) and hours (hour) are accepted.
53-
api_key : str, optional
54-
Tiingo API key . If not provided the environmental variable
55-
TIINGO_API_KEY is read. The API key is *required*.
28+
Historical data from Tiingo on equities, ETFs and mutual funds,
29+
with re-sampling capability. This query is limited to the last
30+
1,000 bars based in the endDate. So the startDate is moved if
31+
it goes past the limit.
32+
33+
Parameters
34+
----------
35+
symbols : {str, List[str]}
36+
String symbol or list of symbols
37+
start : string, int, date, datetime, Timestamp
38+
Starting date. Parses many different kind of date
39+
representations (e.g., 'JAN-01-2010', '1/1/10', 'Jan, 1, 1980'). Defaults to
40+
20 years before current date.
41+
end : string, int, date, datetime, Timestamp
42+
Ending date
43+
retry_count : int, default 3
44+
Number of times to retry query request.
45+
pause : float, default 0.1
46+
Time, in seconds, of the pause between retries.
47+
session : Session, default None
48+
requests.sessions.Session instance to be used
49+
freq : {str, None}
50+
Re-sample frequency. Format is # + (min/hour); e.g. "15min" or "4hour".
51+
If no value is provided, defaults to 5min. The minimum value is "1min".
52+
Units in minutes (min) and hours (hour) are accepted.
53+
api_key : str, optional
54+
Tiingo API key . If not provided the environmental variable
55+
TIINGO_API_KEY is read. The API key is *required*.
5656
"""
5757

5858
def __init__(
@@ -105,7 +105,7 @@ def _get_crumb(self, *args):
105105
pass
106106

107107
def _read_one_data(self, url, params):
108-
""" read one data from specified URL """
108+
"""read one data from specified URL"""
109109
headers = {
110110
"Content-Type": "application/json",
111111
"Authorization": "Token " + self.api_key,
@@ -207,7 +207,7 @@ def _get_crumb(self, *args):
207207
pass
208208

209209
def _read_one_data(self, url, params):
210-
""" read one data from specified URL """
210+
"""read one data from specified URL"""
211211
headers = {
212212
"Content-Type": "application/json",
213213
"Authorization": "Token " + self.api_key,

pandas_datareader/tsp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def url(self):
7272
return "https://secure.tsp.gov/components/CORS/getSharePricesRaw.html"
7373

7474
def read(self):
75-
""" read one data from specified URL """
75+
"""read one data from specified URL"""
7676
df = super(TSPReader, self).read()
7777
df.columns = map(lambda x: x.strip(), df.columns)
7878
df.drop(columns=self.all_symbols - set(self.symbols), inplace=True)

pandas_datareader/yahoo/daily.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def _get_params(self, symbol):
144144
return params
145145

146146
def _read_one_data(self, url, params):
147-
""" read one data from specified symbol """
147+
"""read one data from specified symbol"""
148148

149149
symbol = params["symbol"]
150150
del params["symbol"]

pandas_datareader/yahoo/fx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def read(self):
7878
self.close()
7979

8080
def _read_one_data(self, symbol):
81-
""" read one data from specified URL """
81+
"""read one data from specified URL"""
8282
url = "https://query1.finance.yahoo.com/v8/finance/chart/{}=X".format(symbol)
8383
params = self._get_params(symbol)
8484

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
black==19.10b0; python_version > '3.5'
1+
black==21.5b1; python_version > '3.5'
22
flake8-bugbear; python_version > '3.5'
33
coverage
44
codecov

0 commit comments

Comments
 (0)