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
In:
# comment
from foo import bar
def main():
...
-------------------------------------------------------------------------------
Out String:
# comment
from foo import bar
def main():
...
-------------------------------------------------------------------------------
Out file:
# comment
from foo import bar
def main():
...
So interestingly enough, it seems like lines_before_import does not affect files in this case. Is there a config option that I did not find?
Another observation I made, If I change the input sting in a way that isort wants to change it for other reasons than lines_before_import, files and strings behave the same way. E.g., changing from foo import bar to from foo import (bar,) makes the outputs be the same.
When checking if a file got altered, leading and trailing white space is infact
relevant. Especially considering the existence of config options like
`lines_before_imports` and `lines_after_imports`.
Here is the minimal example is created:
Which yields
So interestingly enough, it seems like
lines_before_import
does not affect files in this case. Is there a config option that I did not find?Another observation I made, If I change the input sting in a way that
isort
wants to change it for other reasons thanlines_before_import
, files and strings behave the same way. E.g., changingfrom foo import bar
tofrom foo import (bar,)
makes the outputs be the same.This might or might not be related to #1854
The text was updated successfully, but these errors were encountered: