Both PRs strengthen Leo's mypy annotations.


- PR #3856  <https://github.com/leo-editor/leo-editor/pull/3856>completes 
the annotations in leoApp.py.

- PR #3857 <https://github.com/leo-editor/leo-editor/pull/3857> completes 
the annotations in leoGlobals.py


The second PR is the big one. Annotating the "g.app" ivar correctly in 
LeoApp.py unblocked mypy! Suddenly, mypy found complaints in dozens of 
other files! The diffs in all the other files arise from this one change.


*Bug fixes*


PR #3857 <https://github.com/leo-editor/leo-editor/pull/3857> fixes several 
bugs in addition to adding annotations. See the PR for details. I have 
carefully tested these bug fixes.


*A breaking change*


PR #3857 <https://github.com/leo-editor/leo-editor/pull/3857> also removes 
the evil "multiple" kwarg from the runOpenFileDialog method in qt_gui.py. 
This PR adds the runOpenFile*s*Dialog (plural) method. Removing the kwarg 
is a minor breaking change. It was impossible to annotate the original 
method in any helpful way.


*Summary*


These two PRs are a milestone in Leo's history. Most of Leo's objects are 
now correctly annotated!!


I have carefully tested the bug fixes. Please do the same :-)


Removing the "multiple" kwarg is a minor breaking change. I'm not sure the 
change is significant enough to call the next release 6.8.0.


All your questions and comments are welcome.


Edward


P.S. In retrospect, perhaps it isn't *so *surprising that correctly 
annotating the "g.app" ivar unblocked mypy. The previous "Any" annotation 
for this crucial ivar likely inhibited mypy checks in myriad ways. Still, 
the enhanced checking was a great surprise.


EKR

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/a0b444d7-80fc-4577-b253-7c7f38c890acn%40googlegroups.com.

Reply via email to