如何让VSCode读取文件中的isort配置?
问题:仓库内的.isort.cfg配置文件无法生效
我希望将isort配置存储在代码仓库中(类似.editorconfig的使用方式),但当前配置未生效。
当前配置详情
VSCode设置(不生效)
"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", ],
仓库内的.isort.cfg文件内容
[settings] profile=hug
VSCode保存文件时的isort输出日志
/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
内容的提问来源于stack exchange,提问作者jkulak
相关产品推荐
相关产品推荐

