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
I came across a bug where isort strips off the leading characters (in my case a comment) when there's indentation next to an import. I found this in an older version of isort, but still see it in 5.12.0
#!/usr/bin/env python3
if True:
# this comment breaks
import sys
when invoked with isort break_isort.py results in
#!/usr/bin/env python3
if True:
is comment breaks
import sys
The text was updated successfully, but these errors were encountered:
The value for the indentation level of the comment gets set here: https://github.com/PyCQA/isort/blob/main/isort/core.py#L340, basically whats this is doing is setting the indentation level of the whole block without imports to the new indentation of the import block.
I came across a bug where isort strips off the leading characters (in my case a comment) when there's indentation next to an import. I found this in an older version of isort, but still see it in 5.12.0
when invoked with
isort break_isort.py
results inThe text was updated successfully, but these errors were encountered: