Fixing imports in type-stubs for Pyright
Mikaël Capelle
capelle.mikael at gmail.com
Thu May 28 10:20:28 BST 2026
In many PyQt6 stubs file, abstract collections from `collections.abc` are
used, but the import is `collections` which breaks pyright (see
https://github.com/microsoft/pyright/issues/5241), which is one of the most
commonly used type checker.
An easy fix would to import `collections.abc` instead of simply
`collections` (or both if both are needed) in the stubs file.
Holt59
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20260528/f325cbd6/attachment.htm>
More information about the PyQt
mailing list