[PySide] PySide6 typing stubs available

Philippe Fremy phil at freehackers.org
Sun Jul 30 00:18:28 CEST 2023


Hi,

Static typing python program is a growing trend with many benefits : 
better bug detection and better reliability for example.

Unfortunately, the stubs provided by default the pyside6 package are 
both incorrect and incomplete. But there is hope...

I have just released the pyside6-stubs package which provides noticeable 
improvements over the default stubs. For example :

  * add all missing signals to the stubs (many were missing)
  * fix QFileDialog.getOpen*() methods to accept None as parent argument
  * support all QSize and QSizeF operations
  * fix QTreeWidgetItem comparison with <
  * fix qVersion() returns string, not bytes
  * fix qDebug(), qWarning(), qCritical(), qFatal(), SIGNAL(), SLOT() to
    accept string, not bytes

And many more...

To benefit from this, install the pip package : 
https://pypi.org/project/PySide6-stubs/

To help improve the stubs or report any bug, it's here : 
https://github.com/python-qt-tools/PySide6-stubs

Regards,

Philippe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20230730/1c914a83/attachment.htm>


More information about the PySide mailing list