Skip to content

Commit

Permalink
Consistent sorting of missing keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Waskom committed Sep 20, 2021
1 parent a179cdc commit 7417eb7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion seaborn/_core/mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def setup(
elif isinstance(provided, dict):
missing = set(data) - set(provided)
if missing:
formatted = ", ".join(map(repr, missing))
formatted = ", ".join(map(repr, sorted(missing, key=str)))
err = f"Missing {self._semantic} for following value(s): {formatted}"
raise ValueError(err)
dictionary = provided
Expand Down
1 change: 1 addition & 0 deletions seaborn/tests/_core/test_mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
DashMapping,
MarkerMapping,
)
from seaborn.palettes import color_palette


class TestGroupMapping:
Expand Down

0 comments on commit 7417eb7

Please sign in to comment.