The schedule for PR #4755 and its follow-ons

14 views
Skip to first unread message

Edward K. Ream

unread,
Jun 28, 2026, 9:26:14 PM (2 days ago) Jun 28
to leo-editor
PR #4755 is ready for review! This PR improves annotations in six of Leo's most important files. See the first comment of this PR for details.

Expect two or three days of testing before this PR is merged. There is no rush.

Afterwards, I'll create three more PRs that improve annotations:

- The first will require mypy's strict_optional setting for the rest of the files in leo/core.
- The second will do the same for the files in leo/commands.
- The third will cover Leo's Qt gui files.

Expect each follow-on PR to take several days.

Creating "big" PRs like this greatly simplifies my workflow. Leo's cff commands are ideal for mass changes. Creating smaller PRs would greatly slow the work without changing the total number of diffs.

Stay tuned!

Edward

Edward K. Ream

unread,
Jun 29, 2026, 8:47:20 AM (yesterday) Jun 29
to leo-editor
On Sunday, June 28, 2026 at 8:26:14 PM UTC-5 Edward K. Ream wrote:

PR #4755 is ready for review!

Review is going well. Many thanks to Félix. The PR remains a draft while I fix more and more annotations.
 
Afterwards, I'll create three more PRs that improve annotations:

- The first will require mypy's strict_optional setting for the rest of the files in leo/core.
- The second will do the same for the files in leo/commands.
- The third will cover Leo's Qt gui files.

This is still the plan.

However, mypy's --follow-imports=normal option reveals annotation problems outside of the six core files that PR #4755 is supposedly checking.

Yes, the PR could ignore those errors, but why do that? The PR should follow mypy errors wherever they lead!

It looks like the PR will eventually fix 400+ mypy complaints to resolve, in at least the following files:

    leo/plugins/mod_scripting.py,
    leo/plugins/qt_commands.py,
    leo/plugins/qt_frame.py,
    leo/plugins/qt_gui.py,
    leo/plugins/qt_idle_time.py,
    leo/plugins/qt_layout.py,
    leo/plugins/qt_text.py,
    leo/plugins/qt_tree.py,
    leo/plugins/viewrendered.py,
    leo/plugins/viewrendered3.py.

These additional diffs are the result of the annotations made in the original six files.

Crucially, fixing these "outside" complaints can sometimes reveal other problems in the original six files! That is, it's virtually impossible to predict how changes to annotations will cascade.

Summary

Imo, nothing would be gained by not fixing all the mypy complaints as they arise. This will make  PR #4755 much larger than expected. But that means that the later PRs should be shorter than expected.

Edward




Reply all
Reply to author
Forward
0 new messages