You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using version 3.9.6 with line_length=79, I note the following behavior for this sample input file, test.py:
from .. importviewsfrom ..viewsimport (
_a,
_xxxxxx_xxxxxxx_xxxxxxxx_xxx_xxxxxxxasxxxxxx_xxxxxxx_xxxxxxxx_xxx_xxxxxxx)
deftest():
pass
> $ isort -c test.py
> $ echo $?
0
However, the check should fail because the as import line contains 80 characters. If I fix the line length, for example by wrapping before the as, isort claims the line violates the configured policy, and suggests an alternative which in fact violates the line length limitation:
+++ /Users/jgaren/Documents/dev/styleseat/test.py:after 2015-08-10 12:23:19.281534
@@ -1,5 +1,4 @@
from .. import views
from ..views import (
_a,
- _xxxxxx_xxxxxxx_xxxxxxxx_xxx_xxxxxxx
- as xxxxxx_xxxxxxx_xxxxxxxx_xxx_xxxxxxx)
+ _xxxxxx_xxxxxxx_xxxxxxxx_xxx_xxxxxxx as xxxxxx_xxxxxxx_xxxxxxxx_xxx_xxxxxxx)
def test():
If I then just give up, and try to have isort skip checking the line, I encounter yet another bug.
Input:
from .. import views
from ..views import ( # isort:skip
_a,
_xxxxxx_xxxxxxx_xxxxxxxx_xxx_xxxxxxx as xxxxxx_xxxxxxx_xxxxxxxx_xxx_xxxxxxx)
def test():
pass
Output of --diff:
from .. import views
+
from ..views import ( # isort:skip
_a,
_xxxxxx_xxxxxxx_xxxxxxxx_xxx_xxxxxxx as xxxxxx_xxxxxxx_xxxxxxxx_xxx_xxxxxxx)
The suggested addition of a newline would not be correct, as it results in an extra import grouping.
The text was updated successfully, but these errors were encountered:
Using version 3.9.6 with
line_length=79
, I note the following behavior for this sample input file,test.py
:However, the check should fail because the
as
import line contains 80 characters. If I fix the line length, for example by wrapping before theas
, isort claims the line violates the configured policy, and suggests an alternative which in fact violates the line length limitation:If I then just give up, and try to have isort skip checking the line, I encounter yet another bug.
Input:
Output of --diff:
The suggested addition of a newline would not be correct, as it results in an extra import grouping.
The text was updated successfully, but these errors were encountered: