Skip to content

Commit 7b352dc

Browse files
committed
expect to fail; removed check
1 parent f6f1210 commit 7b352dc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pandas/core/indexes/multi.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4123,7 +4123,7 @@ def insert(self, loc: int, item) -> MultiIndex:
41234123

41244124
new_levels = []
41254125
new_codes = []
4126-
for k, level, level_codes in zip(item, self.levels, self.codes):
4126+
for k, level, level_codes in zip(item, self.levels, self.codes, strict=True):
41274127
if k not in level:
41284128
# have to insert into level
41294129
# must insert at end otherwise you have to recompute all the
@@ -4219,7 +4219,7 @@ def _lexsort_depth(codes: list[np.ndarray], nlevels: int) -> int:
42194219

42204220

42214221
def sparsify_labels(label_list, start: int = 0, sentinel: object = ""):
4222-
pivoted = list(zip(*label_list))
4222+
pivoted = list(zip(*label_list, strict=True))
42234223
k = len(label_list)
42244224

42254225
result = pivoted[: start + 1]
@@ -4228,7 +4228,7 @@ def sparsify_labels(label_list, start: int = 0, sentinel: object = ""):
42284228
for cur in pivoted[start + 1 :]:
42294229
sparse_cur = []
42304230

4231-
for i, (p, t) in enumerate(zip(prev, cur)):
4231+
for i, (p, t) in enumerate(zip(prev, cur, strict=True)):
42324232
if i == k - 1:
42334233
sparse_cur.append(t)
42344234
result.append(sparse_cur) # type: ignore[arg-type]
@@ -4243,7 +4243,7 @@ def sparsify_labels(label_list, start: int = 0, sentinel: object = ""):
42434243

42444244
prev = cur
42454245

4246-
return list(zip(*result))
4246+
return list(zip(*result, strict=True))
42474247

42484248

42494249
def _get_na_rep(dtype: DtypeObj) -> str:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ exclude = [
452452
"pandas/core/groupby/groupby.py" = ["B905"]
453453
"pandas/core/groupby/grouper.py" = ["B905"]
454454
"pandas/core/groupby/ops.py" = ["B905"]
455-
"pandas/core/indexes/multi.py" = ["B905"]
455+
"pandas/core/indexing.py" = ["B905"]
456456
"pandas/core/methods/to_dict.py" = ["B905"]
457457
"pandas/core/reshape/concat.py" = ["B905"]
458458
"pandas/core/reshape/encoding.py" = ["B905"]

0 commit comments

Comments
 (0)