How to format Python file in VS Code?

Asked

Viewed 245 times

0

I am trying to format a Python document in VS Code, and the following message appears:

command 'php.untrustValidationExecutable' not found

How can I fix this?

NOTE: Another problem, I have installed everything but does not format any extension other than HTML and Javascript, when I press ALT+SHIFT+F.

  • Vscode only comes with support for HTML, CSS, Javascript and Typescript, if you want it to format other languages, you need to download an extension. You have the Python extension?

  • Yes, I do own.

  • When you try to format, does the extension not suggest you install autopep8, yapf or black? These dependencies are responsible for formatting Python code.

  • Yes, they were suggested. I installed the autopep8, but it’s still the same.

  • You can start with this tutorial

  • Okay, thank you!

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.