How to reformat and indent Python code
PaoloAmoroso (126)

In a Python REPL, suppose I edit some code in a file and break the canonical indentation. Is there an editor command to reformat and indent the code? I've the command palette but haven't found anything relevant.

You are viewing a single comment. View All
malvoliothegood (427)

It can be tricky. You could try copying and pasting your code into an online formatter. E.g.

PaoloAmoroso (126)

@malvoliothegood So it looks like doesn't provide a reformat option. Thanks anyway.