Mypy stubs for the PySide6 (Qt6 for Python)
Author : Philippe Fremy
This package provides improved typing stubs for Qt6 for Python/PySide6. The
official stubs delivered along with PySide6 are reasonably good but may be incomplete in a few areas
for proper typing verification with mypy.
Notable improvements:
- add typing information for all properties
- add conversion from
QByteArraytobytes - add construction of
QByteArrayfrom length and string - fix
QFileDialog.getOpen*()methods to acceptNoneas parent argument - fix
QLineEdit.setText()to acceptNone - fix
QTreeWidget.setItemWidget()andQListWidget.setItemWidget()to acceptNoneas a widget argument - fix
QProgressDialog.setCancelButton()acceptingNone - support all
QSizeandQSizeFoperations - fix
QTabBar.setButtonWidget()to acceptNoneas a widget argument - fix
QTreeWidget.topLevelItem()returning possiblyNone - fix
QTreeWidgetItemcomparison with< - fix
QMessageBox.warning,information,critical,question,about,aboutQtto acceptNoneas parent argument - fix
qVersion()returns string, not bytes - fix
qDebug(),qWarning(),qCritical(),qFatal(),SIGNAL(),SLOT()to accept string, not bytes - fix
Signal.connect(),Signal.disconnect(),QObject.connect()andQObject.disconnect()to acceptstrinstead ofbool, and to returnboolon disconnect. - fix incorrect signature of
QCoreApplication.translate() - improve signature of operations on
QPolygon - fix
QObject.findChildren()andQObject.findChild()to detect that type being returned is the one being searched
See CHANGELOG.md for full details.
This effort was inspired by the PyQt5-stubs and PySide2-stubs project.
Please note that this work is far from complete. Don't hesitate to report problems or propose improvements.
Licensing
As a derived work from PySide6, the stubs are delivered under the LGPL v2.1 . See file LICENSE for more details.
Installation
Install from pypi:
$ pip install PySide6-stubs
If you want to install the stable development version from the Git repository:
$ pip install git+https://github.com/python-qt-tools/PySide6-stubs
Help improve the stubs
If you notice incorrect or missing typing information (mypy reports errors eventhough your code is correct), please report it here with the following steps:
- create an issue showing your problem
- even better, create a PR to fix the problem. See CONTRIBUTING.md for details.
Metadata
Release files for PySide6-stubs 6.7.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyside6_stubs-6.7.3.0.tar.gz | 509.9 kB | Without provenance | Details for pyside6_stubs-6.7.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyside6_stubs-6.7.3.0-py3-none-any.whl | Python 3 | none | any | Details for pyside6_stubs-6.7.3.0-py3-none-any.whl |
Total release size: 1.1 MB
Release files / pyside6_stubs-6.7.3.0.tar.gz
| Download URL | pyside6_stubs-6.7.3.0.tar.gz |
|---|---|
| Size | 509.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
db8def2bb9c74091bfa2a4df7610d3ea344ecd00ebd4283995eeb5fda8383603
|
|
BLAKE2b-256 checksum How to use checksums |
722bd2a3fdb212475682b11e8b6330f2cada60dcbbaf151f73f86844b11d1db6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / pyside6_stubs-6.7.3.0-py3-none-any.whl
| Download URL | pyside6_stubs-6.7.3.0-py3-none-any.whl |
|---|---|
| Size | 550.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7a2ef0d7486939f240e745829f80887ec3eab280e52c9930d64b48b3de95042a
|
|
BLAKE2b-256 checksum How to use checksums |
e92e3488fa3baca56ff494b9502424675f5b14b11e966eb74d5adaf1811cd651
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for PySide6-stubs 6.7.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.