From cc9965bfd76f94f07e0cebb3a2fffca69aa2f551 Mon Sep 17 00:00:00 2001 From: MomIsBestFriend <> Date: Thu, 16 Jan 2020 21:01:33 +0200 Subject: [PATCH 1/4] CLN: __all__ for core/index.py --- pandas/core/index.py | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/pandas/core/index.py b/pandas/core/index.py index 8cff53d7a8b74..20a38f25fb2c6 100644 --- a/pandas/core/index.py +++ b/pandas/core/index.py @@ -1,6 +1,6 @@ import warnings -from pandas.core.indexes.api import ( # noqa:F401 +from pandas.core.indexes.api import ( CategoricalIndex, DatetimeIndex, Float64Index, @@ -20,7 +20,30 @@ ensure_index_from_sequences, get_objs_combined_axis, ) -from pandas.core.indexes.multi import _sparsify # noqa:F401 +from pandas.core.indexes.multi import _sparsify + +__all__ = [ + "CategoricalIndex", + "DatetimeIndex", + "Float64Index", + "Index", + "Int64Index", + "IntervalIndex", + "InvalidIndexError", + "MultiIndex", + "NaT", + "NumericIndex", + "PeriodIndex", + "RangeIndex", + "TimedeltaIndex", + "UInt64Index", + "_new_Index", + "ensure_index", + "ensure_index_from_sequences", + "get_objs_combined_axis", + "_sparsify", +] + # GH#30193 warnings.warn( From afab230a6ac7648f543ce4f1a31a97f85220ce49 Mon Sep 17 00:00:00 2001 From: MomIsBestFriend <> Date: Thu, 16 Jan 2020 21:35:47 +0200 Subject: [PATCH 2/4] Removed unused import --- pandas/core/index.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/pandas/core/index.py b/pandas/core/index.py index 20a38f25fb2c6..ad7e6507e179e 100644 --- a/pandas/core/index.py +++ b/pandas/core/index.py @@ -20,7 +20,6 @@ ensure_index_from_sequences, get_objs_combined_axis, ) -from pandas.core.indexes.multi import _sparsify __all__ = [ "CategoricalIndex", @@ -41,7 +40,6 @@ "ensure_index", "ensure_index_from_sequences", "get_objs_combined_axis", - "_sparsify", ] From fc7c32f3f44e37a1bee2ada12b049c62f6776ce0 Mon Sep 17 00:00:00 2001 From: MomIsBestFriend <> Date: Thu, 16 Jan 2020 21:51:21 +0200 Subject: [PATCH 3/4] Removed internals from __all__ --- pandas/core/index.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pandas/core/index.py b/pandas/core/index.py index ad7e6507e179e..7d6e7931d445c 100644 --- a/pandas/core/index.py +++ b/pandas/core/index.py @@ -36,7 +36,6 @@ "RangeIndex", "TimedeltaIndex", "UInt64Index", - "_new_Index", "ensure_index", "ensure_index_from_sequences", "get_objs_combined_axis", From 2058924eb8a3c98bf3ecd4e9d92e2026dd2d999c Mon Sep 17 00:00:00 2001 From: MomIsBestFriend <> Date: Fri, 17 Jan 2020 01:36:52 +0200 Subject: [PATCH 4/4] Remove unused import --- pandas/core/index.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pandas/core/index.py b/pandas/core/index.py index 7d6e7931d445c..9fc9ee709ffba 100644 --- a/pandas/core/index.py +++ b/pandas/core/index.py @@ -15,7 +15,6 @@ RangeIndex, TimedeltaIndex, UInt64Index, - _new_Index, ensure_index, ensure_index_from_sequences, get_objs_combined_axis,