Python Forum

Full Version: Has anyone tried the module Black ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
https://black.readthedocs.io/en/stable/

Did anyone try this? I tried it through the command line ( black my_file.py ) and it made some format change on my file in open Notepad++ immediately. Pretty cool.
I downloaded and tried it, I need to make a side by side comparison before I can comment.
I really try to be compliant with PEP8, so didn't notice any immediate change .
I use black as code formatter in VS Code,see setup here.
now if only it would use blackletter font.
By the way, I installed Anaconda and black there but have no idea how to use it.
do you use VSCode?
if so, do following:
  • choose file->Preferences->settings
  • Type python.formatting.provider in text window
  • Select black
No, I used Spyder since I started following MIT Data Science course ( 6.00.2x) on EdX. But I still prefer Notepad++ because I can open it in a smaller window so that I can look at the video material and type into the editor at the same time. With Anaconda I have only a full-screen option.
Got an answer on StackOverFlow from Spyder developer - it's not possible to use black yet, they will try to add it in version 4.