The python black project.

Dmitry Tantsur dtantsur at redhat.com
Thu Apr 18 08:57:38 UTC 2019


Hi,

On 4/18/19 10:51 AM, Natal Ng├ętal wrote:
> Hi everyone,
> 
> Black is project to format Python code. It's more and more used by the python
> community. That can save time and harmonize the code. For example, simple quote
> versus double quote, that was not checked by pep8.i It's just an example of
> what make  black With a pre-hook commit hook this will be also avoid to lose
> time with pep8 errors.

I'm not sure what exactly Black does, but the last thing I want to see is 
patches changing between single and double quotes. If it's not the case or it 
can be turned off, I'm all for experimenting.

> 
> Two links to see more:
> 
> https://github.com/ambv/black
> https://www.mattlayman.com/blog/2018/python-code-black/
> 
> I think it can be very interesting to start to use Black on OpenStack. What
> do you thinks about that? For example, we can introduce it on some projects, I
> would volunteer to try on TripleO.

Given it's a pre-commit hook, isn't it supposed to be done on developer's 
machines? If so, how do you see applying Black to the whole OpenStack?

Dmitry

> 
> My best regards
> 




More information about the openstack-discuss mailing list