From 053dae43ca5e655394be1411837c5bd9c858e817 Mon Sep 17 00:00:00 2001 From: tp Date: Tue, 26 May 2020 00:43:51 +0100 Subject: [PATCH] Small clean-up --- pandas/core/arrays/string_.py | 1 + pandas/tests/extension/decimal/array.py | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/pandas/core/arrays/string_.py b/pandas/core/arrays/string_.py index 70e4135f3315d..a07a21e0dba87 100644 --- a/pandas/core/arrays/string_.py +++ b/pandas/core/arrays/string_.py @@ -166,6 +166,7 @@ class StringArray(PandasArray): On the other hand, instantiating StringArrays directly with non-strings will raise an error: + >>> pd.arrays.StringArray(np.array([1, 2])) ValueError: StringArray requires a sequence of strings or pandas.NA diff --git a/pandas/tests/extension/decimal/array.py b/pandas/tests/extension/decimal/array.py index d934ca8243c9b..4d5be75ff8200 100644 --- a/pandas/tests/extension/decimal/array.py +++ b/pandas/tests/extension/decimal/array.py @@ -131,8 +131,6 @@ def copy(self): return type(self)(self._data.copy()) def astype(self, dtype, copy=True): - from pandas.core.arrays.string_ import StringDtype - dtype = pandas_dtype(dtype) if isinstance(dtype, type(self.dtype)): return type(self)(self._data, context=dtype.context)