I’m following the recent Python Tutorial for Beginners (with mini-projects). So my settings are set up just as Dave’s at 29:25, I did everything just like him (except I’m on Mac and not Windows), and when I save or try to manually format the document it isn’t formatting anything, nothing changes. Can someone please help?
Did you install the “Python VS Code extension” from Microsoft? And if you select ‘Format Document With…’ does it give you the option for ‘Python’ under “Select Formatter?”
In this video he also shows how to display the settings json file. Can you copy the contents of that here (Or just check under the Python section?)
addendum: maybe even just skip this part, not a huge fan of installing an auto-formatter first thing in a beginner’s course about Python where formatting is so important, in fact a major feature of the language
Yes nothing changes.
I did the same thing as Dave in the video and put an indentation where there shouldn’t be one, and when I save or format with python, nothing changes like it does for him
Hi, Ive just had the same issue. Im not sure how its successfully removing the spaces before line04 in Daves example, when I try it does nothing. It also prompts to use either Black or autopep8 as the formatter. I ended up installing Black and setting that as the default. Opening the Output window for Black I could see it complaining “Skipping non python code”. Basically the formatter is working but it’s not seeing the spaces before line04 in Daves example as python code so its doing nothing. If you were to put a bunch of spaces between ‘line04 =’ and “*****” it will reformat ok.