Skip to content

module incorrectly indentified as STDLIB instead of FIRSTPARTY #2383

Open
@Flamefire

Description

@Flamefire

This might be another effect of #1704 but it seems different enough to have an own issue.
In short: We import a module from the same package using an absolute import but it gets classified as STDLIB

Basically we have a repo with 2 modules: The main module and a test module:

- easybuild
  - __ini__t.py
  - base
    - __ini__t.py
    - fanclogger.py
- test
  - __ini__t.py
  - easyblocks
    - __ini__t.py
    - specific.py
    - foo.py

Now the file foo.py imports files from the main module and another test:

import easybuild.base.fancylogger

import test.easyblocks.specific

isort somehow determines that the specific.py import is STDLIB which seems wildly off. I'd have understood it being classified as FIRSTPARTY or THIRDPARTY but STDLIB?

Output of isort -v:

                    VERSION 6.0.1

from-type place_module for easybuild.base returned THIRDPARTY
else-type place_module for test.easyblocks.easyblock_specific returned STDLIB

Can there anything be done that test.easyblocks.foo does not consider test.easyblocks.specific as STDLIB?

Metadata

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