About me I've been a computer programmer since I first started typing in program listings on a Commodore Vic 20 when I was about 8. My hobbies include electronics, CNC manufacturing, photography, beer and winemaking.
I live with my wife and lots of left-over parts from unfinished projects in Lincoln, Nebraska, USA.]
Blog
5 October 2021, 23:41 UTCMy experience adding type annotations to a 2.5k-line Python library
The wwvb package for Python
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 & code coverage
to improve the quality of Python code. Most recently, I added type annotations
through the whole package until mypy --strict was happy with
the whole wwvb package and uwwvb module.
The annotations were added in two steps: See pull requests #7 and #8. 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!
My experience adding type annotations to a 2.5k-line Python library
The wwvb package for Python 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 & code coverage to improve the quality of Python code. Most recently, I added type annotations through the whole package until mypy --strict was happy with the whole wwvb package and uwwvb module.
The annotations were added in two steps: See pull requests #7 and #8. 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!
All older entries
Website Copyright © 2004-2024 Jeff Epler