Skip to content

Is there a way to let know isort that subpackages are not third party libraries in mono repo setup? #2403

@andresliszt

Description

@andresliszt

I'm working on a mono repo with multiples subpackages. Each subpackage is a separate python project (In specific, they are lambda functions to be used in AWS). My repo structure looks like:

my-project/
├── pyproject.toml
├── foo/
│   ├── pyproject.toml
│   └── foo/
│       └── __init__.py
└── bar/
    ├── pyproject.toml
    └── bar/
        └── __init__.py

In the very top level pyproject I setup a dev environment installing all the lambdas:

[tool.poetry.dependencies]
python = "^3.11"
foo = { path = "foo", develop = true }
bar = { path = "bar", develop = true }

When I run isort from my-project , foo and bar are considered as third party libraries and their imports are placed in the second import block. Is there a way to let know isort that they shoud be treated as first party?

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