Set up Python Black and isort on Visual Studio Code

Опубликовано: 23 Февраль 2021
на канале: Very Academy
10,210
175

Here is a quick guide on how to set up Python Black and isort in visual studio code. isort and Black works really well together and comes baked in starting with version 5. All we need to do to use isort alongside Black is to set the isort profile to "--profile=black".

{
"python.pythonPath": "venv\\Scripts\\python.exe",
"editor.formatOnSave": true,
"python.formatting.provider": "black",
"python.formatting.blackArgs": [
"--line-length=119"
],
"python.sortImports.args": [
"--profile=black",
],
"[python]": {
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
}
}

✨ Support us - join us as a Very Academy Member
   / @veryacademy  

👍SUBSCRIBE to get more free tutorials, courses and code snippets!
   / @veryacademy  

👍👍Follow us on Facebook
  / veryacademycom-113232103670580  

👍👍👍Follow use on Twitter:
  / veryacademy  


Смотрите видео Set up Python Black and isort on Visual Studio Code онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал Very Academy 23 Февраль 2021. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 10,210 раз и оно понравилось 175 посетителям.