On Mac, Option +Shift + F now brings up the "There is no formatter for 'python' files installed." message box:
I tried installing this plugin, without a change seen to this situation:
I already have these two plugins installed for Python:
However as @starball mentioned, it may have reduced support now.
So according to the new world, is there a different way that I can get the on-demand (keyboard shortcut based) automatic code formatting for Python in VSCode to work?
Versions:
Once VSCode Python's format feature came from the python package, VSCode now offers smarter and more customizable extensions.
autopep8 and Black formatter were provided by Microsoft.
Ruff and yapf were provided by community.
Once you install a formatter extension, you can select it as the default formatter for Python files in VS Code by following the steps below:
You could read document about Formatting in vscode-python for more details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With