Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add-imports="from __future__ import annotations" produced syntax error with 'v=""""""\n' as input #1769

Closed
graingert opened this issue Jun 30, 2021 · 1 comment · Fixed by #1775
Labels
bug Something isn't working

Comments

@graingert
Copy link
Member

graingert commented Jun 30, 2021

on version==5.9.1

input:

v=""""""

expected output:

from __future__ import annotations

v=""""""

actual output:

v=""""""

from __future__ import annotations
@graingert
Copy link
Member Author

another stranger one:
input

v = """
""".split(
    "\n"
)
$ pipx run isort --add-imports='from __future__ import annotations' foo.py

output:

v = """
""".split(
    "\n"
from __future__ import annotations

)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants