Skip to content
This repository has been archived by the owner on Jan 2, 2021. It is now read-only.

unicode_literals import isn't detected if part of a multiline import statement #207

Open
wyattanderson opened this issue May 8, 2019 · 1 comment
Labels

Comments

@wyattanderson
Copy link

Thanks for this helpful tool! We're excited to incorporate it into our workflow. I found one very slightly inconvenient bug when futurizing a particular file added the following from __future__ imports:

from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from __future__ import unicode_literals

Subsequently running isort reduces this to:

from __future__ import (absolute_import, division, print_function,
                        unicode_literals)

Now, errors about native string literals appear where they otherwise would not, assumedly because this check only checks for the presence of unicode_literals on the same line only.

Happy to take a whack at a PR.

@brettcannon
Copy link
Owner

A PR would be appreciated!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants