Completing the make_stub_files project

11 views
Skip to first unread message

Edward K. Ream

unread,
Aug 10, 2021, 5:57:34 PM8/10/21
to leo-editor
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

Edward K. Ream

unread,
Aug 10, 2021, 7:33:27 PM8/10/21
to leo-editor
On Tue, Aug 10, 2021 at 4:57 PM Edward K. Ream <edre...@gmail.com> wrote:

In short, fixing one bug morphed into almost a week's worth of work. It's time to declare that the project is complete.

Past time :-) For example, running mypy in strict mode on the msf source produces several errors. They are not worth fixing.

Edward
Reply all
Reply to author
Forward
0 new messages