Skip to content

Commit 734c384

Browse files
committed
clean up
1 parent 8d8fec0 commit 734c384

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

pandas/core/arrays/string_arrow.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from typing import (
66
TYPE_CHECKING,
77
Union,
8-
KeysView, #Bug fix 60343 to handle dict_keys type explicitely
8+
KeysView, #Bug fix to handle dict_keys type explicitely
99
)
1010
import warnings
1111

@@ -190,7 +190,7 @@ def _from_sequence(
190190

191191
_chk_pyarrow_available()
192192

193-
# Handle explicit dtype "string" or "str" Bug fix 60343
193+
# Bug fix handle explicit dtype "string" or "str"
194194
if dtype:
195195
if isinstance(dtype, str) and dtype == "str":
196196
# Use StringDtype with Python storage explicitly
@@ -211,7 +211,7 @@ def _from_sequence(
211211
return cls(pc.cast(scalars, pa.large_string()))
212212

213213

214-
elif isinstance(scalars, KeysView): #Bug Fix 60343
214+
elif isinstance(scalars, KeysView): #Bug Fix
215215
#Convert dict_keys to a NumPy array. Note dict_keys is a type alias for KeysView.
216216
scalars = list(scalars)
217217

pandas/core/construction.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -666,11 +666,11 @@ def sanitize_array(
666666
subarr = _sanitize_str_dtypes(subarr, data, dtype, copy)
667667

668668
from pandas.core.arrays.string_ import StringDtype
669-
if dtype == "str": #Bug fix 60343
669+
if dtype == "str": #Bug fix
670670
# Use StringDtype explicitly when dtype="str"
671671
dtype = StringDtype(storage="python")
672672

673-
if isinstance(data, KeysView): #Bug fix 60343
673+
if isinstance(data, KeysView): #Bug fix
674674
# Convert dict_keys to a list for processing
675675
data = list(data)
676676

pandas/core/indexes/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,12 +483,12 @@ def __new__(
483483
tupleize_cols: bool = True,
484484
) -> Self:
485485
from pandas.core.indexes.range import RangeIndex
486-
from pandas.core.arrays.string_ import StringDtype #Bug fix 60343
486+
from pandas.core.arrays.string_ import StringDtype #Bug fix
487487

488488
name = maybe_extract_name(name, data, cls)
489489

490490
if dtype is not None:
491-
if dtype == "str": #Bug fix 60343
491+
if dtype == "str": #Bug fix
492492
dtype = StringDtype(storage="python")
493493
dtype = pandas_dtype(dtype)
494494

pandas/tests/indexes/test_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ def test_is_numeric(self, index, expected):
693693
def test_is_object(self, index, expected, using_infer_string):
694694
if using_infer_string and index.dtype == "string" and expected:
695695
expected = False
696-
#Bug fix 60343
696+
#Bug fix
697697
if index.dtype.name == "string":
698698
assert not is_object_dtype(index) # string[python] is not an object dtype
699699
elif index.dtype.name == "object":
@@ -1744,7 +1744,7 @@ def test_is_monotonic_pyarrow_list_type():
17441744
assert not idx.is_monotonic_increasing
17451745
assert not idx.is_monotonic_decreasing
17461746

1747-
def test_index_from_dict_keys_with_dtype(): # Bug fix 60343
1747+
def test_index_from_dict_keys_with_dtype(): # Bug fix
17481748
d = {"a": 1, "b": 2}
17491749

17501750
# Test without dtype (default inference)

0 commit comments

Comments
 (0)