File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1749,9 +1749,9 @@ def validate_all_hashable(*args) -> None:
1749
1749
>>> validate_all_hashable(1)
1750
1750
1751
1751
>>> validate_all_hashable([1])
1752
- ValueError : All elements must be hashable
1752
+ TypeError : All elements must be hashable
1753
1753
"""
1754
- if not all (is_hashable (x ) for x in args ):
1754
+ if not all (is_hashable (arg ) for arg in args ):
1755
1755
raise TypeError ("All elements must be hashable" )
1756
1756
1757
1757
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ def test_copy_names():
79
79
with pytest .raises (ValueError , match = "Length of new names must be 2, got 1" ):
80
80
multi_idx .copy (names = ["mario" ])
81
81
82
- with pytest .raises (TypeError , match = "MultiIndex.name must be a hashable type " ):
82
+ with pytest .raises (TypeError , match = "All elements must be hashable" ):
83
83
multi_idx .copy (names = [["mario" ], ["luigi" ]])
84
84
85
85
You can’t perform that action at this time.
0 commit comments