How to Sort Python Imports in VS Code

preview_player
Показать описание
In this short video, you'll learn how to automatically sort your Python import statements in Visual Studio Code. I also talk about where the sort order comes from any why you want to sort your import statements this way.

#python #vscode #pythontutorial
Рекомендации по теме
Комментарии
Автор

This is not in my context menu. However, I can use Command Palette -> ‘Organize Imports’. That requires the isort extension by Microsoft to be installed.

immortalsun
Автор

Thanks for explaining the sorting criteria. I thought there was something wrong with my VS Code because I couldn't notice the sorting order in mine.

devinchandrapala
Автор

How did you get the import statements to automatically move to the top of the Python file?

bmccollneb
visit shbcf.ru