PR #4576 is a milestone in Leo's code base:
- It completely replaces the dreaded "Wrapper" annotation with concrete annotations.
- It resolves many "Widget" annotations to more specific and concrete annotations.
- The remaining "Widget" annotations seem natural:
They describe args that can range over a wide variety of actual gui widgets.
I completed this PR in just two days. The workflow was remarkably straightforward:
- I changed annotations one at a time, then ran mypy and other tests.
- When in doubt, I traced the annotated value to see what its class was.
This workflow highlighted several places where various wrapper classes could be simplified. Afaik, I made only one botch. Eating my own dog food quickly revealed my mistake.
Summary
For at least ten years, I have wanted to resolve the confusion between Leo's wrapper and widget classes. This PR succeeds beyond my fondest hopes.
This PR must be tested thoroughly. I plan to merge the PR only after releasing Leo 6.8.8, coming in about 10 days. I welcome all comments and suggestions.
Edward