I use black
to automatically format all of my Python code whenever I save in VSCode. I'd like the same functionality, but within a Jupyter notebook in VSCode.
This answer shows how to right click and format a cell or a whole notebook from the right click context menu, or a keyboard shortcut. Can I make this happen on save instead?
It looks like there is an issue related to this, but it is over a year old.
Are there any good workarounds? Maybe a way to set the format notebook option to the same keybinding as save?
UPDATE:
If you like me want this functionality to be added please go to the issue and upvote it, the devs said they will need a bunch of upvotes before it's considered.
UPDATE:
This got enough attention that it has been added!