首页 > 解决方案 > 如何找到 vscode 正在使用的 isort

问题描述

https://code.visualstudio.com/docs/python/editing#_sort-imports

我已经设定

    "[python]": {
        "editor.codeActionsOnSave": {
            "source.organizeImports": true
        }
    },

在 vscode 中,它看起来选择了正确的 python 解释器,但它没有按预期生成排序导入。我怀疑 vscode 使用了错误的 isort,我怎样才能找出 vscode 到底使用了哪个 isort?

标签: pythonvisual-studio-codeisort

解决方案


VS Code 附带了它自己使用的 isort 副本,目前是 isort 4.3.21。您可以在 Python 通道的输出面板中查看扩展是如何执行 isort 的。


推荐阅读