Skip to content

Commit 7232386

Browse files
committed
fixes
1 parent 8595981 commit 7232386

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pandas/core/dtypes/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1749,9 +1749,9 @@ def validate_all_hashable(*args) -> None:
17491749
>>> validate_all_hashable(1)
17501750
17511751
>>> validate_all_hashable([1])
1752-
ValueError: All elements must be hashable
1752+
TypeError: All elements must be hashable
17531753
"""
1754-
if not all(is_hashable(x) for x in args):
1754+
if not all(is_hashable(arg) for arg in args):
17551755
raise TypeError("All elements must be hashable")
17561756

17571757

pandas/tests/indexes/multi/test_names.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def test_copy_names():
7979
with pytest.raises(ValueError, match="Length of new names must be 2, got 1"):
8080
multi_idx.copy(names=["mario"])
8181

82-
with pytest.raises(TypeError, match="MultiIndex.name must be a hashable type"):
82+
with pytest.raises(TypeError, match="All elements must be hashable"):
8383
multi_idx.copy(names=[["mario"], ["luigi"]])
8484

8585

0 commit comments

Comments
 (0)