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

TID252 [*] Prefer absolute imports over relative imports from parent modules
 --> application.py:6:1
  |
5 | from ....import unknown
6 | from ..protocol import commands, definitions, responses
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 | from ..server import example
8 | from .. import server
  |
help: Replace relative imports from parent modules with absolute imports
  |
5 | from ....import unknown
  - from ..protocol import commands, definitions, responses
6 + from my_package.sublib.protocol import commands, definitions, responses
7 | from ..server import example
  |
note: This is an unsafe fix and may change runtime behavior

TID252 [*] Prefer absolute imports over relative imports from parent modules
 --> application.py:6:1
  |
5 | from ....import unknown
6 | from ..protocol import commands, definitions, responses
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 | from ..server import example
8 | from .. import server
  |
help: Replace relative imports from parent modules with absolute imports
  |
5 | from ....import unknown
  - from ..protocol import commands, definitions, responses
6 + from my_package.sublib.protocol import commands, definitions, responses
7 | from ..server import example
  |
note: This is an unsafe fix and may change runtime behavior

TID252 [*] Prefer absolute imports over relative imports from parent modules
 --> application.py:6:1
  |
5 | from ....import unknown
6 | from ..protocol import commands, definitions, responses
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 | from ..server import example
8 | from .. import server
  |
help: Replace relative imports from parent modules with absolute imports
  |
5 | from ....import unknown
  - from ..protocol import commands, definitions, responses
6 + from my_package.sublib.protocol import commands, definitions, responses
7 | from ..server import example
  |
note: This is an unsafe fix and may change runtime behavior

TID252 [*] Prefer absolute imports over relative imports from parent modules
 --> application.py:7:1
  |
5 | from ....import unknown
6 | from ..protocol import commands, definitions, responses
7 | from ..server import example
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8 | from .. import server
9 | from . import logger, models
  |
help: Replace relative imports from parent modules with absolute imports
  |
6 | from ..protocol import commands, definitions, responses
  - from ..server import example
7 + from my_package.sublib.server import example
8 | from .. import server
  |
note: This is an unsafe fix and may change runtime behavior

TID252 [*] Prefer absolute imports over relative imports from parent modules
  --> application.py:8:1
   |
 6 | from ..protocol import commands, definitions, responses
 7 | from ..server import example
 8 | from .. import server
   | ^^^^^^^^^^^^^^^^^^^^^
 9 | from . import logger, models
10 | from ..protocol.UpperCaseModule import some_function
   |
help: Replace relative imports from parent modules with absolute imports
  |
7 | from ..server import example
  - from .. import server
8 + from my_package.sublib import server
9 | from . import logger, models
  |
note: This is an unsafe fix and may change runtime behavior

TID252 [*] Prefer absolute imports over relative imports from parent modules
  --> application.py:10:1
   |
 8 | from .. import server
 9 | from . import logger, models
10 | from ..protocol.UpperCaseModule import some_function
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: Replace relative imports from parent modules with absolute imports
   |
9  | from . import logger, models
   - from ..protocol.UpperCaseModule import some_function
10 + from my_package.sublib.protocol.UpperCaseModule import some_function
   |
note: This is an unsafe fix and may change runtime behavior
