Skip to content

Commit e14857a

Browse files
committed
expect to fail; removed check
1 parent 22e1068 commit e14857a

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

pandas/core/indexes/multi.py

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

40774077
new_levels = []
40784078
new_codes = []
4079-
for k, level, level_codes in zip(item, self.levels, self.codes):
4079+
for k, level, level_codes in zip(item, self.levels, self.codes, strict=True):
40804080
if k not in level:
40814081
# have to insert into level
40824082
# must insert at end otherwise you have to recompute all the
@@ -4172,7 +4172,7 @@ def _lexsort_depth(codes: list[np.ndarray], nlevels: int) -> int:
41724172

41734173

41744174
def sparsify_labels(label_list, start: int = 0, sentinel: object = ""):
4175-
pivoted = list(zip(*label_list))
4175+
pivoted = list(zip(*label_list, strict=True))
41764176
k = len(label_list)
41774177

41784178
result = pivoted[: start + 1]
@@ -4181,7 +4181,7 @@ def sparsify_labels(label_list, start: int = 0, sentinel: object = ""):
41814181
for cur in pivoted[start + 1 :]:
41824182
sparse_cur = []
41834183

4184-
for i, (p, t) in enumerate(zip(prev, cur)):
4184+
for i, (p, t) in enumerate(zip(prev, cur, strict=True)):
41854185
if i == k - 1:
41864186
sparse_cur.append(t)
41874187
result.append(sparse_cur) # type: ignore[arg-type]
@@ -4196,7 +4196,7 @@ def sparsify_labels(label_list, start: int = 0, sentinel: object = ""):
41964196

41974197
prev = cur
41984198

4199-
return list(zip(*result))
4199+
return list(zip(*result, strict=True))
42004200

42014201

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

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,6 @@ exclude = [
462462
"pandas/core/groupby/groupby.py" = ["B905"]
463463
"pandas/core/groupby/grouper.py" = ["B905"]
464464
"pandas/core/groupby/ops.py" = ["B905"]
465-
"pandas/core/indexes/multi.py" = ["B905"]
466465
"pandas/core/indexing.py" = ["B905"]
467466
"pandas/core/methods/to_dict.py" = ["B905"]
468467
"pandas/core/reshape/concat.py" = ["B905"]

0 commit comments

Comments
 (0)