Skip to content

Commit 2d8e075

Browse files
committed
Formatting fixes
1 parent 4c32dfe commit 2d8e075

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

pandas_datareader/data.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,9 @@ def DataReader(name, data_source=None, start=None, end=None,
290290

291291
elif data_source == "iex":
292292
return IEXDailyReader(symbols=name, start=start, end=end,
293-
chunksize=25,
294-
retry_count=retry_count, pause=pause,
295-
session=session).read()
293+
chunksize=25,
294+
retry_count=retry_count, pause=pause,
295+
session=session).read()
296296

297297
elif data_source == "iex-tops":
298298
return IEXTops(symbols=name, start=start, end=end,

pandas_datareader/iex/daily.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ class IEXDailyReader(_DailyBaseReader):
4343

4444
def __init__(self, symbols=None, start=None, end=None, retry_count=3,
4545
pause=0.35, session=None, chunksize=25):
46-
super(IEXDailyReader, self).__init__(symbols=symbols, start=start, end=end,
47-
retry_count=retry_count, pause=pause, session=session, chunksize=chunksize)
46+
super(IEXDailyReader, self).__init__(symbols=symbols, start=start,
47+
end=end, retry_count=retry_count,
48+
pause=pause, session=session,
49+
chunksize=chunksize)
4850

4951
@property
5052
def url(self):
@@ -83,7 +85,8 @@ def _range_string_from_date(self):
8385
def read(self):
8486
"""read data"""
8587
try:
86-
return self._read_one_data(self.url, self._get_params(self.symbols))
88+
return self._read_one_data(self.url,
89+
self._get_params(self.symbols))
8790
finally:
8891
self.close()
8992

@@ -103,8 +106,8 @@ def _read_lines(self, out):
103106
df = df[values]
104107
sstart = self.start.strftime('%Y-%m-%d')
105108
send = self.end.strftime('%Y-%m-%d')
106-
df= df.loc[sstart:send]
107-
result.update({symbol:df})
109+
df = df.loc[sstart:send]
110+
result.update({symbol: df})
108111
if len(result) > 1:
109112
return result
110-
return result[self.symbols]
113+
return result[self.symbols]

pandas_datareader/tests/test_iex_daily.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88
class TestIEXDaily(object):
99

10+
@classmethod
11+
def setup_class(cls):
12+
pytest.importorskip("lxml")
13+
1014
@property
1115
def start(self):
1216
return datetime(2015, 2, 9)
@@ -27,7 +31,7 @@ def test_daily_invalid_date(self):
2731
start = datetime(2010, 1, 5)
2832
end = datetime(2017, 5, 24)
2933
with pytest.raises(Exception):
30-
df = web.DataReader(["AAPL", "TSLA"], "iex", start, end)
34+
web.DataReader(["AAPL", "TSLA"], "iex", start, end)
3135

3236
def test_single_symbol(self):
3337
df = web.DataReader("AAPL", "iex", self.start, self.end)
@@ -72,4 +76,3 @@ def test_multiple_symbols_2(self):
7276
expected4 = t.loc["2017-05-24"]
7377
assert expected4["close"] == 310.22
7478
assert expected4["high"] == 311.0
75-

0 commit comments

Comments
 (0)