If you have files in this structure:
project
|- sub-package
|- pyproject.toml
|- something.py
say that pyproject.toml configures for profile black.
Then, this works (picks up the profile black):
C:\project> python -m isort C:\project\sub-package\something.py
but this does not:
C:\project> type C:\project\sub-package\something.py | python -m isort - --filename C:\project\sub-package\something.py
but this does (notice the CWD)
C:\project\sub-package> type C:\project\sub-package\something.py | python -m isort - --filename C:\project\sub-package\something.py
In VS Code extension for isort we are using the stdin way to perform sorting. This is need to support the organize import on save capability. I was able to simulate the same problem using type (on windows) and cat (on linux).
reference issue: microsoft/vscode-isort#138
If you have files in this structure:
say that
pyproject.tomlconfigures for profile black.Then, this works (picks up the profile black):
but this does not:
but this does (notice the CWD)
In VS Code extension for
isortwe are using the stdin way to perform sorting. This is need to support the organize import on save capability. I was able to simulate the same problem usingtype(on windows) andcat(on linux).reference issue: microsoft/vscode-isort#138