A Quarto filter to format the python code using black
quarto add shafayetShafee/black-formatter
This will install the extension under the _extensions
subdirectory.
If you're using version control, you will want to check in this directory.
Add the filter in your quarto document
---
filters:
- black-formatter
---
Here is the source code for a minimal example: example.qmd and view the rendered output with black-formatted code here