isort line-wraps later when multiple imports, making lines too long

Created on 20 Sep 2019  路  2Comments  路  Source: PyCQA/isort

Should not isort always wrap after import when that is required to keep lines within the line length? When there are more than one import and Hanging Indent mode is used, that does not seem to be the case.

Or, in other words, should not isort always wrap after import in the example below?

$ isort -w 25 -m 2 tmp.py

Contents of tmp.py:

from package1 import first_package, \
    second_package
from package2 import \
    first_package

#                       |
#               25 characters
bug

Most helpful comment

This is fixed into develop and will make it's way into the 5.0.0 release of isort.

Thanks everyone!

All 2 comments

This bug is only prevalent for hanging indent I believe. Should I go ahead and fix it?

This is fixed into develop and will make it's way into the 5.0.0 release of isort.

Thanks everyone!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

and-semakin picture and-semakin  路  3Comments

pawamoy picture pawamoy  路  3Comments

darkclouder picture darkclouder  路  3Comments

kevindaum picture kevindaum  路  4Comments

johnthagen picture johnthagen  路  3Comments