Adjust isort line length to reduce import wrapping

- Black defaults to a line length of 88 characters, which causes
  unnecessary wrapping of long imports.
- Since isort follows Black's profile by default, imports were
  being excessively wrapped at 88 characters.
- Setting `line_length = 200` in `pyproject.toml` provides a
  balance between keeping imports readable and avoiding excessive
  wrapping.
- This ensures that single imports remain on one line while
  extremely long imports may still wrap for readability.

Change-Id: Iee6c3d4ecb3f9aaa96b3245a1103773b2101b2ba
Signed-off-by: Andrew Vaillancourt <andrew.vaillancourt@windriver.com>
This commit is contained in:
Andrew Vaillancourt
2025-03-05 23:58:22 -05:00
parent 0f11de29d0
commit 2367125475

View File

@@ -1,6 +1,7 @@
[tool.isort]
py_version = "311"
profile = "black"
line_length = 200 # Allows longer imports without excessive wrapping
[tool.black]
target-version = ['py311']