Skip to content

Commit 19eecb2

Browse files
fixed style errors using flake8
1 parent 59b91a1 commit 19eecb2

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
lines changed

pandas/tests/test_dtype_utc.py

+18-11
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,28 @@
77
"""
88
import nose
99
import pandas as pd
10-
import datetime, pytz
10+
import datetime
11+
import pytz
1112
from pandas.util.testing import assert_series_equal
1213

14+
1315
def test_dtype_utc():
14-
15-
data=pd.Series( [pd.NaT, pd.NaT, datetime.datetime(2016, 12, 12, 22, 24, 6, 100001, tzinfo=pytz.utc) ] )
16-
17-
filled=data.fillna(method='bfill')
18-
19-
expected=pd.Series([datetime.datetime(2016, 12, 12, 22, 24, 6, 100001, tzinfo=pytz.utc) ,
20-
datetime.datetime(2016, 12, 12, 22, 24, 6, 100001, tzinfo=pytz.utc) ,
21-
datetime.datetime(2016, 12, 12, 22, 24, 6, 100001, tzinfo=pytz.utc) ])
16+
17+
data = pd.Series([pd.NaT, pd.NaT,
18+
datetime.datetime(2016, 12, 12, 22, 24, 6, 100001,
19+
tzinfo=pytz.utc)])
20+
21+
filled = data.fillna(method='bfill')
22+
23+
expected = pd.Series([datetime.datetime(2016, 12, 12, 22, 24, 6, 100001,
24+
tzinfo=pytz.utc),
25+
datetime.datetime(2016, 12, 12, 22, 24, 6, 100001,
26+
tzinfo=pytz.utc),
27+
datetime.datetime(2016, 12, 12, 22, 24, 6, 100001,
28+
tzinfo=pytz.utc)])
2229

2330
assert_series_equal(filled, expected)
24-
31+
2532
if __name__ == '__main__':
2633
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
27-
exit=False)
34+
exit=False)

pandas/types/common.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626

2727
_DATELIKE_DTYPES = set([np.dtype(t)
2828
for t in ['M8[ns]', '<M8[ns]', '>M8[ns]',
29-
'm8[ns]', '<m8[ns]', '>m8[ns]']] + [_NS_DTYPE_UTC])
29+
'm8[ns]', '<m8[ns]', '>m8[ns]']] +
30+
[_NS_DTYPE_UTC])
3031

3132
_ensure_float64 = algos.ensure_float64
3233
_ensure_float32 = algos.ensure_float32

0 commit comments

Comments
 (0)