Skip to content

"organize imports" is inconsistent depending on whether the file is saved or not #8245

Description

Related: #4831

I have some isort config set up in tox.ini with a different configuration (specifically, a different set of known_first_party) than the global one set up in vscode.

The problem: If the file is not saved yet, "organize imports" will result in a different output (using the global isort config) than if the file is saved (using the project-wide one). The behaviour when the file is saved is the correct and expected one.

I suspect this happens because vscode runs isort on a temp file in a different directory when it's not saved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-intellisenseLSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc.bugIssue identified by VS Code Team member as probable bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions