Sort hash maps in Settings display (#10370)

## Summary

We had a report of a test failure on a specific architecture, and
looking into it, I think the test assumes that the hash keys are
iterated in a specific order. This PR thus adds a variant to our
settings display macro specifically for maps and sets. Like `CacheKey`,
it sorts the keys when printing.

Closes https://github.com/astral-sh/ruff/issues/10359.
This commit is contained in:
Charlie Marsh 2024-03-12 12:59:38 -07:00 committed by GitHub
parent dbf82233b8
commit c56fb6e15a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 165 additions and 67 deletions

View file

@ -97,8 +97,8 @@ impl fmt::Display for Settings {
namespace = "linter.pydocstyle",
fields = [
self.convention | optional,
self.ignore_decorators | debug,
self.property_decorators | debug
self.ignore_decorators | set,
self.property_decorators | set
]
}
Ok(())