---
source: crates/ruff_linter/src/rules/flake8_tidy_imports/mod.rs
---
application.py:5:1: TID252 Prefer absolute imports over relative imports from parent modules
  |
3 | import attrs
4 | 
5 | from ....import unknown
  | ^^^^^^^^^^^^^^^^^^^^^^^ TID252
6 | from ..protocol import commands, definitions, responses
7 | from ..server import example
  |
  = help: Replace relative imports from parent modules with absolute imports

application.py:6:1: TID252 [*] Prefer absolute imports over relative imports from parent modules
  |
5 | from ....import unknown
6 | from ..protocol import commands, definitions, responses
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TID252
7 | from ..server import example
8 | from .. import server
  |
  = help: Replace relative imports from parent modules with absolute imports

ℹ Unsafe fix
3 3 | import attrs
4 4 | 
5 5 | from ....import unknown
6   |-from ..protocol import commands, definitions, responses
  6 |+from my_package.sublib.protocol import commands, definitions, responses
7 7 | from ..server import example
8 8 | from .. import server
9 9 | from . import logger, models

application.py:6:1: TID252 [*] Prefer absolute imports over relative imports from parent modules
  |
5 | from ....import unknown
6 | from ..protocol import commands, definitions, responses
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TID252
7 | from ..server import example
8 | from .. import server
  |
  = help: Replace relative imports from parent modules with absolute imports

ℹ Unsafe fix
3 3 | import attrs
4 4 | 
5 5 | from ....import unknown
6   |-from ..protocol import commands, definitions, responses
  6 |+from my_package.sublib.protocol import commands, definitions, responses
7 7 | from ..server import example
8 8 | from .. import server
9 9 | from . import logger, models

application.py:6:1: TID252 [*] Prefer absolute imports over relative imports from parent modules
  |
5 | from ....import unknown
6 | from ..protocol import commands, definitions, responses
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TID252
7 | from ..server import example
8 | from .. import server
  |
  = help: Replace relative imports from parent modules with absolute imports

ℹ Unsafe fix
3 3 | import attrs
4 4 | 
5 5 | from ....import unknown
6   |-from ..protocol import commands, definitions, responses
  6 |+from my_package.sublib.protocol import commands, definitions, responses
7 7 | from ..server import example
8 8 | from .. import server
9 9 | from . import logger, models

application.py:7:1: TID252 [*] Prefer absolute imports over relative imports from parent modules
  |
5 | from ....import unknown
6 | from ..protocol import commands, definitions, responses
7 | from ..server import example
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TID252
8 | from .. import server
9 | from . import logger, models
  |
  = help: Replace relative imports from parent modules with absolute imports

ℹ Unsafe fix
4 4 | 
5 5 | from ....import unknown
6 6 | from ..protocol import commands, definitions, responses
7   |-from ..server import example
  7 |+from my_package.sublib.server import example
8 8 | from .. import server
9 9 | from . import logger, models
10 10 | from ..protocol.UpperCaseModule import some_function

application.py:8:1: TID252 [*] Prefer absolute imports over relative imports from parent modules
   |
 6 | from ..protocol import commands, definitions, responses
 7 | from ..server import example
 8 | from .. import server
   | ^^^^^^^^^^^^^^^^^^^^^ TID252
 9 | from . import logger, models
10 | from ..protocol.UpperCaseModule import some_function
   |
   = help: Replace relative imports from parent modules with absolute imports

ℹ Unsafe fix
5 5 | from ....import unknown
6 6 | from ..protocol import commands, definitions, responses
7 7 | from ..server import example
8   |-from .. import server
  8 |+from my_package.sublib import server
9 9 | from . import logger, models
10 10 | from ..protocol.UpperCaseModule import some_function

application.py:10:1: TID252 [*] Prefer absolute imports over relative imports from parent modules
   |
 8 | from .. import server
 9 | from . import logger, models
10 | from ..protocol.UpperCaseModule import some_function
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TID252
   |
   = help: Replace relative imports from parent modules with absolute imports

ℹ Unsafe fix
7  7  | from ..server import example
8  8  | from .. import server
9  9  | from . import logger, models
10    |-from ..protocol.UpperCaseModule import some_function
   10 |+from my_package.sublib.protocol.UpperCaseModule import some_function


