Python Forum
How to use nb-black python cde formatter
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to use nb-black python cde formatter
#1
I have used the python code formatter nb_black. I have not used it in about a year. I have some python code that needs formtting. I am always a little unsure of the python format so I let nb_black do it. It usually works.

Now when I try to install nb_black using

pip install nb_black

I get the message that the file nb_black does not exist. However, I can stall nb-black. Notice the position change: the underscore now becomes a dash. I am not sure if they are the same. One works and the other does not. Neithr works today.

When I put the line

%load_ext nb-black

at the top of the program's code it does not do anything. Of course, as I said before, I installed it via

pip install nb-black.

What am I doing wrong? If there is a better python code formatter pleae let me know.

I am using a jupyter notebook on Ubuntu with python 3.7.7.

Any help appreciated. Thanks in advance.

Respectfully,

ErnestTBass
Reply


Messages In This Thread
How to use nb-black python cde formatter - by ErnestTBass - Jun-03-2020, 11:38 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  remove all color but red, then replace it with black kucingkembar 14 7,190 Dec-29-2021, 07:50 PM
Last Post: deanhystad
  VS Code Python Formatter muzikman 6 2,945 Sep-16-2021, 04:40 PM
Last Post: DeaD_EyE
  Checkbuttons always come up as black boxes regardless of the state kenwatts275 5 4,774 Jul-07-2020, 08:00 PM
Last Post: kenwatts275
  Finance: Black Scholes Model not working pwt 5 3,964 May-27-2020, 10:14 AM
Last Post: buran
  after using openpyxl to add colors to script, black shows up white online in excel Soundtechscott 1 3,705 Jun-08-2019, 10:33 PM
Last Post: Soundtechscott
  Because the emoji appears black and white at the exit ? nerd 3 5,634 Jan-28-2019, 11:34 PM
Last Post: nerd
  Python interface only black and white........ Wilson 3 6,189 Jul-15-2017, 01:20 PM
Last Post: sparkz_alot

Forum Jump:

User Panel Messages

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