Skip to content

Commit c6c5367

Browse files
authored
CLN: Nitpicks (#33464)
* CLN: Nitpicks * Restarting CI as it failed to fetch a URL Co-authored-by: MomIsBestFriend <>
1 parent d1cba24 commit c6c5367

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

pandas/_libs/reshape.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ ctypedef fused reshape_t:
3636

3737
@cython.wraparound(False)
3838
@cython.boundscheck(False)
39-
def unstack(reshape_t[:, :] values, uint8_t[:] mask,
39+
def unstack(reshape_t[:, :] values, const uint8_t[:] mask,
4040
Py_ssize_t stride, Py_ssize_t length, Py_ssize_t width,
4141
reshape_t[:, :] new_values, uint8_t[:, :] new_mask):
4242
"""

pandas/core/indexing.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ def _getitem_nested_tuple(self, tup: Tuple):
827827
# this is iterative
828828
obj = self.obj
829829
axis = 0
830-
for i, key in enumerate(tup):
830+
for key in tup:
831831

832832
if com.is_null_slice(key):
833833
axis += 1
@@ -1420,7 +1420,7 @@ def _is_scalar_access(self, key: Tuple) -> bool:
14201420
if len(key) != self.ndim:
14211421
return False
14221422

1423-
for i, k in enumerate(key):
1423+
for k in key:
14241424
if not is_integer(k):
14251425
return False
14261426

@@ -2234,8 +2234,7 @@ def is_nested_tuple(tup, labels) -> bool:
22342234
if not isinstance(tup, tuple):
22352235
return False
22362236

2237-
for i, k in enumerate(tup):
2238-
2237+
for k in tup:
22392238
if is_list_like(k) or isinstance(k, slice):
22402239
return isinstance(labels, ABCMultiIndex)
22412240

pandas/core/internals/managers.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@
4848
make_block,
4949
)
5050

51-
from pandas.io.formats.printing import pprint_thing
52-
5351
# TODO: flexible with index=None and/or items=None
5452

5553
T = TypeVar("T", bound="BlockManager")
@@ -325,7 +323,7 @@ def __repr__(self) -> str:
325323
output += f"\nAxis {i}: {ax}"
326324

327325
for block in self.blocks:
328-
output += f"\n{pprint_thing(block)}"
326+
output += f"\n{block}"
329327
return output
330328

331329
def _verify_integrity(self) -> None:

0 commit comments

Comments
 (0)