0

I want to store isort config in a repository (as I do with .editorconfig).

I went through several resources:

And this is my config that does not work:

"editor.formatOnSave": true,
    "[python]": {
        "editor.defaultFormatter": "ms-python.python",
        "editor.codeActionsOnSave": {
            "source.organizeImports": true
        }
    },
    "python.linting.enabled": true,
    "python.formatting.provider": "black",
    "isort.check": true,
    "isort.logLevel": "debug",
    "isort.args": [
        "--settings",
        "/Users/myname/dev/myproject/.isort.cfg",
    ],

My .isort.cfg

[settings]
profile=hug

On save this is my isort's OUTPUT in VSCode:

/opt/homebrew/bin/python3 -m isort - --settings /Users/myname/dev/myproject/.isort.cfg --filename /Users/myname/dev/myproject/api/src/models/album.py
CWD Linter: /Users/myname/dev/myproject
/opt/homebrew/bin/python3 -m isort - --settings /Users/myname/dev/myproject/.isort.cfg --check --filename /Users/myname/dev/myproject/api/src/models/album.py
CWD Linter: /Users/myname/dev/myproject
jkulak
  • 768
  • 1
  • 6
  • 18
  • Note to self, this issue might have an answer: https://github.com/microsoft/vscode-isort/issues/71 – jkulak Nov 06 '22 at 19:31

0 Answers0