brocha at redhat.com
Tue Jun 4 13:59:56 UTC 2019
QE adopted black for Pulp-Smash and it is helping us to avoid the extra
work on coding style.
I also adopted black + pre-commit in all my open-souce repositories like
"Dynaconf" and it is working very well.
+1 for Black
Senior Quality Engineer - Cloud Management QE - Pulp Project
“Progress is the realization of utopia.”
On Tue, Jun 4, 2019 at 9:27 AM David Davis <daviddavis at redhat.com> wrote:
> I wanted to get feedback from the Pulp community on using black to
> auto-format our Pulp 3 code. I have some mixed feelings about it as I see
> some potential benefits of using it but also some downsides as well.
> For potential upsides, I think it would be nice if all our projects in
> Pulp conformed to the same style. It would make switching between projects
> much easier. I've worked on other projects where each repository had its
> own code style and it added a mental tax switching from one project to
> another. Granted, this was in Ruby whose design incorporates the TMTOWTDI
> philosophy while Python's design is based around the principle "there
> should be one way to do it".
> Moreover, using black would effectively take style comments/noise out of
> PR reviews and we could just focus on logic. It integrates with a lot of
> IDEs and you can also set up a git pre-commit hook so it would also I
> think free developers from having to worry about formatting their code
> while developing.
> The main downside to black I see is that not everyone is going to love it.
> It's highly opinionated and even personally, I don't like all the stylistic
> decisions they've made. I guess it's a question if we can all live with it
> or not. I feel much more confident in it since other projects like
> django have adopted it as well as Pulp QE.
> There's a PR open currently against pulp_rpm and one that was closed
> against pulp_python. I think if enough people are interested in using
> black, we would update pulpcore, the plugin template, and possibly
> pulp_file to use black. We could also recommend it to plugins but of course
> we wouldn't/couldn't enforce its use.
>  https://github.com/python/black
>  https://en.wikipedia.org/wiki/There%27s_more_than_one_way_to_do_it
>  https://www.python.org/dev/peps/pep-0020/#id3
>  https://github.com/python/black#editor-integration
>  https://github.com/python/black#version-control-integration
>  https://github.com/django/deps/blob/master/accepted/0008-black.rst
>  https://github.com/pulp/pulp_rpm/pull/1355
>  https://github.com/pulp/pulp_python/pull/177
> Pulp-dev mailing list
> Pulp-dev at redhat.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pulp-dev