Skip to content
Commit 752c0614 authored by Chris St. Pierre's avatar Chris St. Pierre
Browse files

Fix bad sort with force_single_line and sort_within_sections

With both force_single_line and sort_within_sections enabled, modules
are not reliably sorted alphabetically; instead, all imports that
would be combined if force_single_line were false are instead grouped
together, even if another import should (lexicographically) be
somewhere in their midst. The new test case provides a concrete
example.

Also makes a small regex performance enhancement by precompiling
regexes used when force_single_line=True
parent e13a1685
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment