---
source: crates/ruff/src/rules/isort/mod.rs
---
insert_empty_lines.py:1:1: I001 [*] Import block is un-sorted or un-formatted
  |
1 | / import a
2 | | import b
3 | | x = 1
  | |_^ I001
4 |   import os
5 |   import sys
  |
  = help: Organize imports

ℹ Suggested fix
1 1 | import a
2 2 | import b
  3 |+
3 4 | x = 1
4 5 | import os
5 6 | import sys

insert_empty_lines.py:4:1: I001 [*] Import block is un-sorted or un-formatted
   |
 4 |   import b
 5 |   x = 1
 6 | / import os
 7 | | import sys
 8 | | def f():
   | |_^ I001
 9 |       pass
10 |   if True:
   |
   = help: Organize imports

ℹ Suggested fix
3 3 | x = 1
4 4 | import os
5 5 | import sys
  6 |+
  7 |+
6 8 | def f():
7 9 |     pass
8 10 | if True:

insert_empty_lines.py:14:1: I001 [*] Import block is un-sorted or un-formatted
   |
14 |   class X: pass
15 |   y = 1
16 | / import os
17 | | import sys
18 | | """Docstring"""
   | |_^ I001
19 |   
20 |   if True:
   |
   = help: Organize imports

ℹ Suggested fix
13 13 | y = 1
14 14 | import os
15 15 | import sys
   16 |+
16 17 | """Docstring"""
17 18 | 
18 19 | if True:

insert_empty_lines.py:52:1: I001 [*] Import block is un-sorted or un-formatted
   |
52 | / import os
53 | | 
54 | | # Comment goes here.
   | |_^ I001
55 |   def f():
56 |       pass
   |
   = help: Organize imports

ℹ Suggested fix
51 51 | 
52 52 | import os
53 53 | 
   54 |+
54 55 | # Comment goes here.
55 56 | def f():
56 57 |     pass


