โ01-05-2022 05:17 AM
Has anyone found a nice way to run code-formating (like black) on the notebooks **in the workspace**? My current workflow is to commit the file, pull it locally, format, repush and pull. It would be nice if it was some relatively easy way to run black on the notebook up in the workspace, is it?
โ01-10-2022 09:10 AM
Hi @Erik Parmannโ -- We do not currently have auto-formatting capabilities in the Notebook. As @Joseph Kambourakisโ mentioned, we are working on a new IDE support capability that will enable users to re-format inside of their IDE, but that is currently in development.
We are interested in adding auto-formatting to the Notebook via a tool like black in the future, but we have no plans at this time.
โ01-05-2022 05:24 AM
I don't believe there is a way to do that. We do have something in development called DevBricks that will help with this kind of issue though. It's an IDE tool and it should be in preview soon. If you're interested in it talk to your CSE
โ01-11-2022 02:02 AM
@Kaniz Fatmaโ Yes:-)
โ01-10-2022 09:10 AM
Hi @Erik Parmannโ -- We do not currently have auto-formatting capabilities in the Notebook. As @Joseph Kambourakisโ mentioned, we are working on a new IDE support capability that will enable users to re-format inside of their IDE, but that is currently in development.
We are interested in adding auto-formatting to the Notebook via a tool like black in the future, but we have no plans at this time.
โ12-28-2023 05:49 AM
Hi Erik,
I don't know if you are aware of this feature, currently there is an option to format the code in your databricks notebooks using the black code style formatter.
Just you need to either have a version of your DBR equal to or greater than 11.2 (the libraries are configured by default) either configure the next libraries in your cluster
%pip install black==22.3.0 tokenize-rt==4.2.1
https://docs.databricks.com/en/notebooks/notebooks-code.html#format-python-cells
Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโt want to miss the chance to attend and share knowledge.
If there isnโt a group near you, start one and help create a community that brings people together.
Request a New Group