โ10-22-2025 10:50 PM
Hi all,
Iโm currently exploring how we can format notebook code using Black (installed via libraries) with specific configurations.
I understand that we can configure Black locally using a pyproject.toml file. However, Iโd like to know if thereโs a way to apply these configurations directly within the Databricks UI or cluster environment, since most of our developers primarily code in the UI.
Any guidance or suggestions would be greatly appreciated!
โ10-22-2025 11:23 PM
Hi @Barnita ,
On Databricks Runtime 11.3 LTS and above, Azure Databricks preinstalls black and tokenize-rt. You can use the formatter directly without needing to install these libraries.
Develop code in Databricks notebooks - Azure Databricks | Microsoft Learn
And here's an instruction of how to format code:
Develop code in Databricks notebooks - Azure Databricks | Microsoft Learn
โ10-22-2025 11:35 PM
I think it's possible. Is it described in one of the links I've shared above:
โ10-22-2025 11:23 PM
Hi @Barnita ,
On Databricks Runtime 11.3 LTS and above, Azure Databricks preinstalls black and tokenize-rt. You can use the formatter directly without needing to install these libraries.
Develop code in Databricks notebooks - Azure Databricks | Microsoft Learn
And here's an instruction of how to format code:
Develop code in Databricks notebooks - Azure Databricks | Microsoft Learn
โ10-22-2025 11:30 PM
Hi @szymon_dybczak ,
Thanks for your response. My team has been using the same setup you mentioned. Iโd like to know if thereโs a way to override the default configuration that Black uses in a cluster environment โ for example, adjusting the line-length or other formatting options.
โ10-22-2025 11:35 PM
I think it's possible. Is it described in one of the links I've shared above:
โ10-22-2025 11:38 PM
Sure, I'll try this
Passionate about hosting events and connecting people? Help us grow a vibrant local communityโsign up today to get started!
Sign Up Now