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
Loading
Please register or sign in to comment