https://pantsbuild.org/ logo
#general
Title
# general
g

gorgeous-eve-12553

11/15/2022, 7:13 PM
I know this isn’t the right place to ask this, but I can’t find a good VSCode resource to ask these questions. After I’ve done a
./pants export ::
I have a dist folder with an isort binary, how can I configure VSCode to use that isort when formatting my code? I have it using the correct black binary, but I can’t get it to use the isort binary. This is with both the default python extension and the microsoft official isort plugin. Any ideas how to get pants and vscode to share the same isort binary?
This is my current .vscode/settings.json for this project:
Copy code
{
    "python.defaultInterpreterPath": "dist/export/python/virtualenvs/python-default/3.11.0/bin/python",
    "python.linting.flake8Enabled": true,
    "python.linting.flake8Path": "dist/export/python/virtualenvs/tools/flake8/bin/flake8",
    "python.linting.mypyEnabled": true,
    "python.linting.mypyPath": "dist/export/python/virtualenvs/tools/mypy/bin/mypy",
    "python.testing.pytestEnabled": true,
    "python.testing.pytestPath": "dist/export/python/virtualenvs/tools/pytest/bin/pytest",
    "python.formatting.provider": "black",
    "python.formatting.blackPath": "dist/export/python/virtualenvs/tools/black/bin/black",
    "editor.formatOnPaste": true,
    "editor.formatOnSave": true,
    "editor.suggest.localityBonus": true,
    "editor.codeActionsOnSave": {
      "source.organizeImports": true,
    },
}
5 Views