Skip to content

Commit 523af80

Browse files
jjlkantproost
authored andcommitted
CLN: Fix typing in pandas\tests\arrays\test_datetimelike.py (pandas-dev#28926) (pandas-dev#29014)
1 parent 4ffaa39 commit 523af80

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

pandas/tests/arrays/test_datetimelike.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1+
from typing import Type, Union
2+
13
import numpy as np
24
import pytest
35

46
from pandas._libs import OutOfBoundsDatetime
57

68
import pandas as pd
79
from pandas.core.arrays import DatetimeArray, PeriodArray, TimedeltaArray
10+
from pandas.core.indexes.datetimes import DatetimeIndex
11+
from pandas.core.indexes.period import PeriodIndex
12+
from pandas.core.indexes.timedeltas import TimedeltaIndex
813
import pandas.util.testing as tm
914

1015

@@ -52,7 +57,7 @@ def timedelta_index(request):
5257

5358

5459
class SharedTests:
55-
index_cls = None
60+
index_cls = None # type: Type[Union[DatetimeIndex, PeriodIndex, TimedeltaIndex]]
5661

5762
def test_compare_len1_raises(self):
5863
# make sure we raise when comparing with different lengths, specific

setup.cfg

-3
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,6 @@ ignore_errors=True
136136
[mypy-pandas.tests.arithmetic.test_datetime64]
137137
ignore_errors=True
138138

139-
[mypy-pandas.tests.arrays.test_datetimelike]
140-
ignore_errors=True
141-
142139
[mypy-pandas.tests.dtypes.test_common]
143140
ignore_errors=True
144141

0 commit comments

Comments
 (0)