From 09883b2f8e2239ae7b7477600b8a0f8d8b7d7f9c Mon Sep 17 00:00:00 2001 From: Grigorios Giannakopoulos Date: Mon, 14 Oct 2019 18:47:36 +0300 Subject: [PATCH] =?UTF-8?q?Fix=20mypy=20error=20message=20in=20`pandas/tes?= =?UTF-8?q?ts/indexes/test=5Fnumeric.py`=20=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use Optional to signal that the value may be either an `Index` or `None`. --- pandas/tests/indexes/common.py | 3 ++- setup.cfg | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pandas/tests/indexes/common.py b/pandas/tests/indexes/common.py index b657d8d16df81..1ac6370860ba6 100644 --- a/pandas/tests/indexes/common.py +++ b/pandas/tests/indexes/common.py @@ -1,4 +1,5 @@ import gc +from typing import Optional, Type import numpy as np import pytest @@ -30,7 +31,7 @@ class Base: """ base class for index sub-class tests """ - _holder = None + _holder = None # type: Optional[Type[Index]] _compat_props = ["shape", "ndim", "size", "nbytes"] def test_pickle_compat_construction(self): diff --git a/setup.cfg b/setup.cfg index 64494bf84363e..7fbc41f032faf 100644 --- a/setup.cfg +++ b/setup.cfg @@ -187,9 +187,6 @@ ignore_errors=True [mypy-pandas.tests.indexes.test_category] ignore_errors=True -[mypy-pandas.tests.indexes.test_numeric] -ignore_errors=True - [mypy-pandas.tests.indexes.test_range] ignore_errors=True