Skip to content

Firstparty + from ... import ... corner case #2167

Open
@thejcannon

Description

👋

I come from pantsbuild land! I'm looking at trying to help world-model in this issue

One attempt was to specify each "known" module that we're going to supply (with -p=...) but ran into an interesting corner case.

Given

import requests

from subdirA import fileA

Running isort -p=subdir.fileA file.py (where subdir.fileA isn't in the sandbox we're running isort in) puts both imports together.
Whereas:

import requests

import subdirA.fileA

doesn't.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions