leo-editor icon indicating copy to clipboard operation
leo-editor copied to clipboard

qt_frames shows hundreds of mypy messages

Open tbpassin opened this issue 1 year ago • 0 comments

In testing an upcoming PR, I ran mypy on qt_frames.py. It generated hundreds of messages. This is true of devel - it is not related to my PR. Many if not most of the messages are "[attr-defined]". These are usually spurious because mypy isn't smart enough. For example,

g.app.gui.find_widget_by_name() causes an "[attr-defined]" message despite the method actually existing. In this case, pymy apparently doesn't know the type of g, or maybe of g.app.gui. Without knowing its type, mypy can't know if there is such and attribute or method.

Fixing these should not be combined with any other PR - it would be very confusing and time-consuming to work through. Since these changes have no immediate functional effect, and new PRs that affect qt_frame are coming immediately, I suggest that the addressing the mypy issues be postponed until after 6.8.2.

tbpassin avatar Oct 19 '24 13:10 tbpassin