ruff
23c819b4 - Fix ordering for `force-sort-within-sections` (#8665)

Commit
1 year ago
Fix ordering for `force-sort-within-sections` (#8665) Fixes #8661 ## Summary Imports like `from x import y` don't have an "asname" for the module, so they were placed before imports like `import x as w` since `None` < `Some(s)` for any string s. The fix is to first sort by `first_alias`, since it's `None` for `import x as w`, and then by `asname`. ## Test Plan I included the example from the issue to avoid future regressions.
Author
Parents
Loading