Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override sort configuration per key in configuration #52

Merged
merged 4 commits into from
Mar 16, 2023

Conversation

jonathangreen
Copy link
Contributor

This PR should resolve #43 by adding the ability to override the sort configuration per key in the pyproject.toml file. This ability was not added to the command line switches, as I wasn't sure what a good way to represent this detailed configuration on the command line would be.

Configuration overrides are matched using the fnmatch function so there is support for glob style wildcards when matching keys.

In order to support this functionality a data new class was added TomlSortKeys that keeps track of the full set of keys to a particular TomlSortItem, so that we can find the matching configuration overrides.

@pappasam
Copy link
Owner

Yep, I like that you stick purely to configuration here! 🚀

@pappasam pappasam merged commit 26df965 into pappasam:main Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option to selectively disable sorting for an entry in an array or whole array
2 participants