Skip to content
This repository was archived by the owner on Jan 2, 2021. It is now read-only.
This repository was 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

@wyattanderson

Description

@wyattanderson

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions