For the last several days, I have been working on saying goodbye to the
make_stub_files (msf) project. Completing msf is the last task before restarting my sabbatical. This post will be pre-writing for a few more words in the release notes for msf.
Imo, msf has outgrown its usefulness. Indeed, the recent wax_off script (now included in msf) is a better alternative. The preferred workflow would be to include annotations directly in the sources and use mypy to check those sources. When all annotations are in place, wax_off could create stub files.
I wanted to polish msf for several reasons. First, a bug needed to be fixed, and doing so involved coming up to speed on the entire code base. Second, the @test nodes in msf were an embarrassment: they prevent coverage testing. Third, after getting to 100% coverage, I wanted to add annotations to msf. This experiment indicates that mypy is good, but not perfect. Fourth (and last!!) I remembered a unit test from leoAst.py that ensures that no ast visitors are missing. The new unit test revealed about half a dozen missing visitors, which I then added.
In short, fixing one bug morphed into almost a week's worth of work. It's time to declare that the project is complete.
Summary
I am no longer embarrassed by msf, but I doubt whether anyone will use it. It's time to bid msf farewell forever.
Edward