2 weeks ago
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!
2 weeks ago
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
2 weeks ago
I think it's possible. Is it described in one of the links I've shared above:
2 weeks ago
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
2 weeks ago
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.
2 weeks ago
I think it's possible. Is it described in one of the links I've shared above:
2 weeks ago
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