<div dir="ltr"><div><br></div><div>QE adopted black for Pulp-Smash and it is helping us to avoid the extra work on coding style.</div><div><br></div><div>I also adopted black + pre-commit in all my open-souce repositories like "Dynaconf" and it is working very well.<br></div><div><br></div><div>+1 for Black<br></div><div><br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>
        <p style="font-weight:bold;margin:0px;padding:0px;font-size:14px;text-transform:capitalize;font-family:"RedHatText",sans-serif">
          <span>Bruno</span> <span>Rocha</span><span style="color:rgb(170,170,170);margin:0px"></span>
        </p>
        
        <p style="font-weight:normal;margin:0px;font-size:12px;font-family:"RedHatText",sans-serif">
          <span>Senior Quality Engineer - Cloud Management QE - Pulp Project<br><b>irc</b>: <span>rochacbruno</span></span>
    </p>
    <p style="font-size:12px;margin:0px;font-family:"RedHatText",sans-serif"><span><b>social</b>: <a href="http://about.me/rochacbruno" target="_blank">http://about.me/rochacbruno</a><br></span></p><p style="font-size:12px;margin:0px;font-family:"RedHatText",sans-serif"><span>“Progress is the realization of utopia.”</span><br><span></span>
    </p>
    

    <div style="margin-top:12px">
      <table border="0">
        <tbody><tr>
          <td width="100px"><a href="https://red.ht/sig" target="_blank"> <img src="https://static.redhat.com/libs/redhat/brand-assets/latest/corp/logo.png" width="90" height="auto"></a> </td>
          
        </tr>
      </tbody></table>
    </div>

  </div></div></div></div></div></div></div></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 4, 2019 at 9:27 AM David Davis <<a href="mailto:daviddavis@redhat.com">daviddavis@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I wanted to get feedback from the Pulp community on using black[0] 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.<div><br></div><div>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[1] while Python's design is based around the principle "there should be one way to do it"[2].</div><div><br></div><div>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[3] and you can also set up a git pre-commit hook[4] so it would also I think free developers from having to worry about formatting their code while developing. </div><div><br></div><div>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[5] have adopted it as well as Pulp QE.</div><div><br></div><div>There's a PR open currently against pulp_rpm[6] and one that was closed against pulp_python[7]. 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.</div><div><br></div><div><div>[0] <a href="https://github.com/python/black" target="_blank">https://github.com/python/black</a></div><div>[1] <a href="https://en.wikipedia.org/wiki/There%27s_more_than_one_way_to_do_it" target="_blank">https://en.wikipedia.org/wiki/There%27s_more_than_one_way_to_do_it</a></div><div>[2] <a href="https://www.python.org/dev/peps/pep-0020/#id3" target="_blank">https://www.python.org/dev/peps/pep-0020/#id3</a></div><div>[3] <a href="https://github.com/python/black#editor-integration" target="_blank">https://github.com/python/black#editor-integration</a></div><div>[4] <a href="https://github.com/python/black#version-control-integration" target="_blank">https://github.com/python/black#version-control-integration</a><br clear="all"><div><div dir="ltr" class="gmail-m_2054664057158530510gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>[5] <a href="https://github.com/django/deps/blob/master/accepted/0008-black.rst" target="_blank">https://github.com/django/deps/blob/master/accepted/0008-black.rst</a></div><div>[6] <a href="https://github.com/pulp/pulp_rpm/pull/1355" target="_blank">https://github.com/pulp/pulp_rpm/pull/1355</a></div><div>[7] <a href="https://github.com/pulp/pulp_python/pull/177" target="_blank">https://github.com/pulp/pulp_python/pull/177</a></div><div><br></div><div>David<br></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
Pulp-dev mailing list<br>
<a href="mailto:Pulp-dev@redhat.com" target="_blank">Pulp-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-dev</a><br>
</blockquote></div>