<?xml version="1.0" encoding="utf-8"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#">
<link rel="alternate" type="text/html" href="https://gamma.unpythonic.net/"/>

<title>Jeff Epler's blog</title>
<modified>2021-10-05T23:41:03Z</modified>
<tagline>Photos, electronics, cnc, and more</tagline>
<author><name>Jeff Epler</name><email>jepler@unpythonic.net</email></author>
<entry>
<title>My experience adding type annotations to a 2.5k-line Python library</title>
<issued>2021-10-05T23:41:03Z</issued>
<modified>2021-10-05T23:41:03Z</modified>
<id>https://gamma.unpythonic.net/01633477263</id>
<link rel="alternate" type="text/html" href="https://gamma.unpythonic.net/01633477263"/>
<content type="text/html" mode="escaped">
The &lt;a href=&quot;https://github.com/jepler/wwvbpy&quot;&gt;wwvb package for Python&lt;/a&gt;
has been a focus of my recent hobby-time programming. I've used it as a place
to educate myself about the ins and outs of maintaining a Python package.
In the past, I used it to learn about using pylint, black &amp;amp; code coverage
to improve the quality of Python code.  Most recently, I added type annotations
through the whole package until &lt;tt&gt;mypy --strict&lt;/tt&gt; was happy with
the whole wwvb package and uwwvb module.

&lt;p&gt;The annotations were added in two steps: See pull requests &lt;a href=&quot;https://github.com/jepler/wwvbpy/pull/7&quot;&gt;#7&lt;/a&gt; and &lt;a href=&quot;https://github.com/jepler/wwvbpy/pull/8&quot;&gt;#8&lt;/a&gt;. Together, these PRs contained 320 insertions and 223 deletions across 14 python files, plus 6 insertions in 2 other files related to CI. I did the work during a part of a day, probably under 4 hours of time spent.  Since the package currently contains exactly 2500 physical lines of Python code, adding type annotations touched or added over 10% of physical lines!</content>
</entry>
</feed>
