Skip to content

Commit 136ab42

Browse files
committed
Fix lint errors
1 parent e89b0a6 commit 136ab42

File tree

4 files changed

+2
-28
lines changed

4 files changed

+2
-28
lines changed

pandas/indexes/base.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,11 @@
2626
is_dtype_equal,
2727
is_object_dtype,
2828
is_categorical_dtype,
29-
is_datetime64_any_dtype,
30-
is_timedelta64_dtype,
31-
is_period_dtype,
3229
is_bool_dtype,
3330
is_integer_dtype, is_float_dtype,
3431
is_datetime64_any_dtype,
3532
is_timedelta64_dtype,
33+
is_period_dtype,
3634
needs_i8_conversion,
3735
is_iterator, is_list_like,
3836
is_scalar)

pandas/tseries/period.py

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
deprecate_kwarg)
4444
from pandas.lib import infer_dtype
4545
import pandas.tslib as tslib
46-
from pandas.tslib import Timedelta
4746
from pandas.compat import zip, u
4847

4948

pandas/tseries/tests/test_period.py

-23
Original file line numberDiff line numberDiff line change
@@ -1896,27 +1896,6 @@ def test_constructor_mixed(self):
18961896
exp = PeriodIndex(['2011-01-01', 'NaT', '2012-01-01'], freq='D')
18971897
tm.assert_index_equal(idx, exp)
18981898

1899-
def test_constructor_dtype(self):
1900-
# passing a dtype with a tz should localize
1901-
idx = PeriodIndex(['2013-01', '2013-03'], dtype='period[M]')
1902-
exp = PeriodIndex(['2013-01', '2013-03'], freq='M')
1903-
tm.assert_index_equal(idx, exp)
1904-
1905-
idx = PeriodIndex(['2013-01-05', '2013-03-05'], dtype='period[3D]')
1906-
exp = PeriodIndex(['2013-01-05', '2013-03-05'], freq='3D')
1907-
tm.assert_index_equal(idx, exp)
1908-
1909-
# if we already have a tz and its not the same, then raise
1910-
idx = PeriodIndex(['2013-01-01', '2013-01-02'], freq='D')
1911-
1912-
res = PeriodIndex(idx, dtype='period[M]')
1913-
exp = PeriodIndex(['2013-01', '2013-01'], freq='M')
1914-
tm.assert_index_equal(res, exp)
1915-
1916-
msg = 'specified freq and dtype are different'
1917-
with tm.assertRaisesRegexp(period.IncompatibleFrequency, msg):
1918-
PeriodIndex(['2011-01'], freq='M', dtype='period[D]')
1919-
19201899
def test_constructor_simple_new(self):
19211900
idx = period_range('2007-01', name='p', periods=2, freq='M')
19221901
result = idx._simple_new(idx, 'p', freq=idx.freq)
@@ -4184,8 +4163,6 @@ def test_pi_ops_errors(self):
41844163
'2011-04'], freq='M', name='idx')
41854164
s = pd.Series(idx)
41864165

4187-
msg = r"unsupported operand type\(s\)"
4188-
41894166
for obj in [idx, s]:
41904167
for ng in ["str", 1.5]:
41914168
with tm.assertRaises(TypeError):

pandas/types/common.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def is_datetimetz(array):
7373

7474
def is_period(array):
7575
""" return if we are a period array """
76-
return is_period_dtype(array) # or is_period_arraylike(array)
76+
return is_period_dtype(array) # or is_period_arraylike(array)
7777

7878

7979
def is_datetime64_dtype(arr_or_dtype):

0 commit comments

Comments
 (0)