PyCQA/isort

Bug: Word wrapping works incorrectly with force_single_line=True

ramazanFarrahov opened this issue · 0 comments

Word wrapping works incorrectly with force_single_line=True for from ... import *.

Steps to Reproduce

; .isort.cfg

[settings]
py_version = 39
profile = black
force_single_line = true
# example_file.py

from very.very.very.very.very.very.very.very.very.very.very.very.very.very.very.very.very.very.long.line import *

After running isort the file is broken:

# example_file.py

from very.very.very.very.very.very.very.very.very.very.very.very.very.very.very.very.(
    line import *.long.very.very,
)

Context (Environment)

  • python 3.9
  • isort 5.13.2

Possible fixes

I didn't find a way to disable word wrapping.

I've tried setting wrap_length and line_length to 999999 to avoid wrapping, but it starts conflicting with black (isort removes wrapping, then black puts it back).