---
source: crates/ruff/src/rules/isort/mod.rs
---
force_single_line.py:1:1: I001 [*] Import block is un-sorted or un-formatted
   |
 1 | / import sys, math
 2 | | from os import path, uname
 3 | | from json import detect_encoding
 4 | | from json import dump
 5 | | from json import dumps as json_dumps
 6 | | from json import load
 7 | | from json import loads as json_loads
 8 | | from logging.handlers import StreamHandler, FileHandler
 9 | | 
10 | | # comment 1
11 | | from third_party import lib1, lib2, \
12 | |      lib3, lib7, lib5, lib6
13 | | # comment 2
14 | | from third_party import lib4
15 | | 
16 | | from foo import bar  # comment 3
17 | | from foo2 import bar2  # comment 4
18 | | from foo3 import bar3, baz3  # comment 5
19 | | 
20 | | # comment 6
21 | | from bar import (
22 | |      a, # comment 7
23 | |      b, # comment 8
24 | | )
   |
   = help: Organize imports

ℹ Suggested fix
1     |-import sys, math
2     |-from os import path, uname
   1  |+import math
   2  |+import sys
3  3  | from json import detect_encoding
4  4  | from json import dump
5  5  | from json import dumps as json_dumps
6  6  | from json import load
7  7  | from json import loads as json_loads
8     |-from logging.handlers import StreamHandler, FileHandler
   8  |+from logging.handlers import FileHandler, StreamHandler
   9  |+from os import path, uname
9  10 | 
   11 |+# comment 6
   12 |+from bar import a  # comment 7
   13 |+from bar import b  # comment 8
   14 |+from foo import bar  # comment 3
   15 |+from foo2 import bar2  # comment 4
   16 |+from foo3 import bar3  # comment 5
   17 |+from foo3 import baz3  # comment 5
   18 |+
10 19 | # comment 1
11    |-from third_party import lib1, lib2, \
12    |-     lib3, lib7, lib5, lib6
   20 |+from third_party import lib1
   21 |+from third_party import lib2
   22 |+from third_party import lib3
   23 |+
13 24 | # comment 2
14 25 | from third_party import lib4
15    |-
16    |-from foo import bar  # comment 3
17    |-from foo2 import bar2  # comment 4
18    |-from foo3 import bar3, baz3  # comment 5
19    |-
20    |-# comment 6
21    |-from bar import (
22    |-     a, # comment 7
23    |-     b, # comment 8
24    |-)
   26 |+from third_party import lib5
   27 |+from third_party import lib6
   28 |+from third_party import lib7


