From 78671f54b32175a4b02e04cf9d517ce2e82523df Mon Sep 17 00:00:00 2001 From: Jeroen Kant <45035434+jjlkant@users.noreply.github.com> Date: Wed, 23 Oct 2019 02:52:50 +0200 Subject: [PATCH] CLN: Fix typing in pandas\tests\arrays\test_datetimelike.py (#28926) (#29014) --- pandas/tests/arrays/test_datetimelike.py | 7 ++++++- setup.cfg | 3 --- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pandas/tests/arrays/test_datetimelike.py b/pandas/tests/arrays/test_datetimelike.py index 7c482664bca48f..117a19acbfc3a5 100644 --- a/pandas/tests/arrays/test_datetimelike.py +++ b/pandas/tests/arrays/test_datetimelike.py @@ -1,3 +1,5 @@ +from typing import Type, Union + import numpy as np import pytest @@ -5,6 +7,9 @@ import pandas as pd from pandas.core.arrays import DatetimeArray, PeriodArray, TimedeltaArray +from pandas.core.indexes.datetimes import DatetimeIndex +from pandas.core.indexes.period import PeriodIndex +from pandas.core.indexes.timedeltas import TimedeltaIndex import pandas.util.testing as tm @@ -52,7 +57,7 @@ def timedelta_index(request): class SharedTests: - index_cls = None + index_cls = None # type: Type[Union[DatetimeIndex, PeriodIndex, TimedeltaIndex]] def test_compare_len1_raises(self): # make sure we raise when comparing with different lengths, specific diff --git a/setup.cfg b/setup.cfg index 766099a9d75212..f7920fb61b9429 100644 --- a/setup.cfg +++ b/setup.cfg @@ -136,9 +136,6 @@ ignore_errors=True [mypy-pandas.tests.arithmetic.test_datetime64] ignore_errors=True -[mypy-pandas.tests.arrays.test_datetimelike] -ignore_errors=True - [mypy-pandas.tests.dtypes.test_common] ignore_errors=True