-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Summary Refactor for isort implementation. Closes #7738. I introduced a `NatOrdString` and a `NatOrdStr` type to have a naturally ordered `String` and `&str`, and I pretty much went back to the original implementation based on `module_key`, `member_key` and `sorted_by_cached_key` from itertools. I tried my best to avoid unnecessary allocations but it may have been clumsy in some places, so feedback is appreciated! I also renamed the `Prefix` enum to `MemberType` (and made some related adjustments) because I think this fits more what it is, and it's closer to the wording found in the isort documentation. I think the result is nicer to work with, and it should make implementing #1567 and the like easier :) Of course, I am very much open to any and all remarks on what I did! ## Test Plan I didn't add any test, I am relying on the existing tests since this is just a refactor.
- Loading branch information
Showing
4 changed files
with
152 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.