Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
VS Code Python Formatter
#5
(Sep-06-2021, 04:22 PM)snippsat Wrote:
(Sep-06-2021, 02:59 PM)muzikman Wrote: I know, and get that. However, if something is slightly indented and gives me an error; I was hoping one of these extensions would fix the indentation error.
How many spaces do you use?
Yes it will fix indentation and other stuff,setting is in python.formatting.provider
I have set it to black.
Also talk about here in my tutorial.

I have that set as black in my settings. It will format the long dictionaries, etc. But it's not fixing the indents as it did in your example.

And, every time I paste some code, black says, "Cannot be used with the format selection command"

I checked over the tutorial and made sure I had all of the packages installed for my conda environment.

Is there a config for black?
Reply


Messages In This Thread
VS Code Python Formatter - by muzikman - Sep-06-2021, 02:13 PM
RE: VS Code Python Formatter - by DeaD_EyE - Sep-06-2021, 02:56 PM
RE: VS Code Python Formatter - by muzikman - Sep-06-2021, 02:59 PM
RE: VS Code Python Formatter - by snippsat - Sep-06-2021, 04:22 PM
RE: VS Code Python Formatter - by muzikman - Sep-06-2021, 05:11 PM
RE: VS Code Python Formatter - by snippsat - Sep-06-2021, 05:28 PM
RE: VS Code Python Formatter - by DeaD_EyE - Sep-16-2021, 04:40 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to use nb-black python cde formatter ErnestTBass 3 6,880 Jun-04-2020, 03:51 PM
Last Post: ErnestTBass

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020