tags 馃捊 aliases isort cssclass [[isort]] Setting up auto import sorting in VSCode Stack Overflow Solution First, pip install isort & install isort from VSCode extensions Then, to make isort compatible with black, create a pyproject.toml file at the root of your repo. Add the following to this file: [tool.isort] multi_line_output = 3 include_trailing_comma = true force_grid_wrap = 0 line_length = 88 profile = "black" Edit /.vscode/settings.json and configure black and isort by adding: { "[python]": { "editor.codeActionsOnSave": { "source.organizeImports": true } }, "python.formatting.provider": "black", "isort.args": ["--profile", "black"], } source.organizeImports: true runs isort automatically upon saving document. 馃敆 Links to this page: [[Python]]