<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Robert Roskam</title>
    <description>The latest articles on DEV Community by Robert Roskam (@raiderrobert).</description>
    <link>https://dev.to/raiderrobert</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F229995%2F44c5cc0d-b3ad-48ce-934b-1f49f4d045c9.jpg</url>
      <title>DEV Community: Robert Roskam</title>
      <link>https://dev.to/raiderrobert</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/raiderrobert"/>
    <language>en</language>
    <item>
      <title>Python Tooling Review: pyproject.toml and flake8</title>
      <dc:creator>Robert Roskam</dc:creator>
      <pubDate>Wed, 16 Oct 2019 19:44:52 +0000</pubDate>
      <link>https://dev.to/raiderrobert/python-tooling-review-pyproject-toml-and-flake8-45bb</link>
      <guid>https://dev.to/raiderrobert/python-tooling-review-pyproject-toml-and-flake8-45bb</guid>
      <description>&lt;p&gt;I recently had an opportunity to review some tooling for Python, and I thought I'd share some of my learnings.&lt;/p&gt;

&lt;h1&gt;
  
  
  pyproject.toml
&lt;/h1&gt;

&lt;p&gt;This fancy new file is the replacement for &lt;code&gt;setup.py&lt;/code&gt; and &lt;code&gt;setup.cfg&lt;/code&gt; originally specified in PEP 518 (&lt;a href="https://www.python.org/dev/peps/pep-0518/"&gt;https://www.python.org/dev/peps/pep-0518/&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Simple and clean explanation, right? Well, no, not really.&lt;/p&gt;

&lt;p&gt;Since its release, it's now the exclusive way to configure &lt;code&gt;black&lt;/code&gt; for a project. Additional tools like &lt;code&gt;poetry&lt;/code&gt; (somewhat of a &lt;code&gt;pipenv&lt;/code&gt; competitor) and &lt;code&gt;flit&lt;/code&gt; (a tool to make packaging and publishing to PyPI easier) have come out to also exclusively use &lt;code&gt;pyproject.toml&lt;/code&gt; as their configuration file.&lt;/p&gt;

&lt;p&gt;It's clear from the PEP that this was the intended consequence for other tools to use &lt;code&gt;pyproject.toml&lt;/code&gt;. However, it seems to only have really touched brand new projects. Older, mature packages seem to still primarily be using &lt;code&gt;setup.cfg&lt;/code&gt; for their tooling configs in their CI process.&lt;/p&gt;

&lt;p&gt;I generally tend to adopt new trends like these in my &lt;em&gt;projects&lt;/em&gt;, but in my existing &lt;em&gt;packages&lt;/em&gt; I admit not seeing a whole lot of value presently in ripping out my &lt;code&gt;setup.py&lt;/code&gt; and &lt;code&gt;setup.cfg&lt;/code&gt;  just for fun.&lt;/p&gt;

&lt;h1&gt;
  
  
  flake8
&lt;/h1&gt;

&lt;p&gt;I used pylint for a very long time while at Worthwhile and began using flake8 at Peerfit. I really had no opinion of one over the other.&lt;/p&gt;

&lt;p&gt;However, I can say now that holy crap does flake8 have so much stuff.&lt;br&gt;
It wraps pyflakes, pycodestyle, and mccabe. Additionally, it's just got so many plugins: flake8-bugbear, flake8-import-order, flake8-print, etc (&lt;a href="https://github.com/DmytroLitvinov/awesome-flake8-extensions).This"&gt;https://github.com/DmytroLitvinov/awesome-flake8-extensions).This&lt;/a&gt; rich ecosystem simply doesn't seem to exist for pylint.&lt;/p&gt;

&lt;p&gt;Finally, a lot of major projects seems to use flake8, so the user base is consistent and mature:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Django (&lt;a href="https://github.com/django/django/blob/master/setup.cfg#L5"&gt;https://github.com/django/django/blob/master/setup.cfg#L5&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;flask (&lt;a href="https://github.com/pallets/flask/blob/master/setup.cfg#L22"&gt;https://github.com/pallets/flask/blob/master/setup.cfg#L22&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;even freaking youtube-dl (&lt;a href="https://github.com/ytdl-org/youtube-dl/blob/master/setup.cfg"&gt;https://github.com/ytdl-org/youtube-dl/blob/master/setup.cfg&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So this has sold me on using flake8 for the foreseeable future.&lt;/p&gt;

</description>
      <category>python</category>
      <category>tooling</category>
      <category>packaging</category>
    </item>
  </channel>
</rss>
