diff options
author | Friedemann Kleint <[email protected]> | 2023-04-13 12:18:54 +0200 |
---|---|---|
committer | Friedemann Kleint <[email protected]> | 2023-04-13 14:09:36 +0200 |
commit | 3c2117c6ce31ff403fc2f17a181763057cd2e1bc (patch) | |
tree | efb0d6d40ba4750b0cafb9235048c773ea8cfdb7 /sources/pyside6/PySide6 | |
parent | 9bd4b56b4d48dfb19293a7a7fc6ebd73b8ed7e60 (diff) |
Add type hints for return values modified to Tuple[]
Pick-to: 6.5
Fixes: PYSIDE-2285
Change-Id: I525ffea2f79bf54de43dc02c31a41994fe3004d5
Reviewed-by: Cristian Maureira-Fredes <[email protected]>
Diffstat (limited to 'sources/pyside6/PySide6')
8 files changed, 42 insertions, 42 deletions
diff --git a/sources/pyside6/PySide6/QtBluetooth/typesystem_bluetooth.xml b/sources/pyside6/PySide6/QtBluetooth/typesystem_bluetooth.xml index 2905f6fb5..bbebe3b03 100644 --- a/sources/pyside6/PySide6/QtBluetooth/typesystem_bluetooth.xml +++ b/sources/pyside6/PySide6/QtBluetooth/typesystem_bluetooth.xml @@ -62,7 +62,7 @@ <modify-argument index="1"> <remove-argument/> </modify-argument> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[int, bool]"> <replace-type modified-type="PyTuple"/> </modify-argument> <inject-code class="target" position="beginning"> @@ -73,7 +73,7 @@ <modify-argument index="1"> <remove-argument/> </modify-argument> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[int, bool]"> <replace-type modified-type="PyTuple"/> </modify-argument> <inject-code class="target" position="beginning"> diff --git a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml index 4b8df75ed..1dc96a0fe 100644 --- a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml +++ b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml @@ -744,7 +744,7 @@ <modify-argument index="2"> <remove-argument /> </modify-argument> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[PySide6.QtCore.QLineF.IntersectionType, PySide6.QtCore.QPointF]"> <replace-type modified-type="(intersectType, intersectionPoint)"/> </modify-argument> <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qlinef-intersect"/> @@ -830,7 +830,7 @@ <modify-argument index="3"> <remove-argument/> </modify-argument> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[int, int, int]"> <replace-type modified-type="(year, month, day)"/> </modify-argument> <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qdate-getdate"/> @@ -839,7 +839,7 @@ <modify-argument index="1"> <remove-argument/> </modify-argument> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[int, int]"> <replace-type modified-type="(week, yearNumber)"/> </modify-argument> <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qdate-weeknumber"/> @@ -1360,7 +1360,7 @@ <remove-argument /> <remove-default-expression /> </modify-argument> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[int, bool]"> <replace-type modified-type="(int, bool ok)"/> </modify-argument> <inject-code class="target" position="beginning"> @@ -1372,7 +1372,7 @@ <remove-argument /> <remove-default-expression /> </modify-argument> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[int, bool]"> <replace-type modified-type="(int, bool ok)"/> </modify-argument> <inject-code class="target" position="beginning"> @@ -1384,7 +1384,7 @@ <remove-argument /> <remove-default-expression /> </modify-argument> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[float, bool]"> <replace-type modified-type="(float, bool ok)"/> </modify-argument> <inject-code class="target" position="beginning"> @@ -1396,7 +1396,7 @@ <remove-argument /> <remove-default-expression /> </modify-argument> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[float, bool]"> <replace-type modified-type="(float, bool ok)"/> </modify-argument> <inject-code class="target" position="beginning"> @@ -1407,7 +1407,7 @@ <modify-argument index="2"> <remove-argument /> </modify-argument> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[int, bool]"> <replace-type modified-type="(int, bool ok)"/> </modify-argument> <inject-code class="target" position="beginning"> @@ -1418,7 +1418,7 @@ <modify-argument index="2"> <remove-argument /> </modify-argument> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[int, bool]"> <replace-type modified-type="(int, bool ok)"/> </modify-argument> <inject-code class="target" position="beginning"> @@ -1429,7 +1429,7 @@ <modify-argument index="2"> <remove-argument /> </modify-argument> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[int, bool]"> <replace-type modified-type="(int, bool ok)"/> </modify-argument> <inject-code class="target" position="beginning"> @@ -1440,7 +1440,7 @@ <modify-argument index="2"> <remove-argument /> </modify-argument> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[int, bool]"> <replace-type modified-type="(int, bool ok)"/> </modify-argument> <inject-code class="target" position="beginning"> @@ -2509,7 +2509,7 @@ <modify-argument index="4"> <remove-argument /> </modify-argument> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[bool, int]"> <replace-type modified-type="(retval, pid)"/> </modify-argument> <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qprocess-startdetached"/> diff --git a/sources/pyside6/PySide6/QtGui/typesystem_gui_common.xml b/sources/pyside6/PySide6/QtGui/typesystem_gui_common.xml index ba66a00f2..0cccf7744 100644 --- a/sources/pyside6/PySide6/QtGui/typesystem_gui_common.xml +++ b/sources/pyside6/PySide6/QtGui/typesystem_gui_common.xml @@ -250,7 +250,7 @@ <modify-argument index="1"> <remove-argument/> </modify-argument> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[PySide6.QtGui.QTransform, bool]"> <replace-type modified-type="PyTuple"/> </modify-argument> <inject-code class="target" position="beginning"> @@ -1752,7 +1752,7 @@ </modify-argument> </modify-function> <modify-function signature="text(QString&,QClipboard::Mode)const"> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[str, PySide6.QtGui.QClipboard.Mode]"> <replace-type modified-type="(retval, subtype)"/> </modify-argument> <inject-code class="target" position="end" file="../glue/qtgui.cpp" snippet="qclipboard-text"/> @@ -2349,7 +2349,7 @@ <modify-argument index="1"> <remove-argument/> </modify-argument> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[PySide6.QtGui.QMatrix4x4, bool]"> <replace-type modified-type="PyTuple"/> </modify-argument> <inject-code class="target" position="beginning"> diff --git a/sources/pyside6/PySide6/QtNetwork/typesystem_network.xml b/sources/pyside6/PySide6/QtNetwork/typesystem_network.xml index f70021d8d..92b353b2c 100644 --- a/sources/pyside6/PySide6/QtNetwork/typesystem_network.xml +++ b/sources/pyside6/PySide6/QtNetwork/typesystem_network.xml @@ -97,8 +97,8 @@ <remove-default-expression/> <remove-argument/> </modify-argument> - <modify-argument index="return"> - <replace-type modified-type="(retval, timeOut)"/> + <modify-argument index="return" pyi-type="Tuple[bool, bool]"> + <replace-type modified-type="(retval, timedOut)"/> </modify-argument> <inject-code class="target" position="beginning"> <insert-template name="fix_args,bool*"/> @@ -122,7 +122,7 @@ <remove-default-expression/> <remove-argument/> </modify-argument> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[PySide6.QtCore.QByteArray, PySide6.QtNetwork.QHostAddress, int]"> <replace-type modified-type="(data, address, port)"/> </modify-argument> <inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp" snippet="qudpsocket-readdatagram"/> @@ -147,8 +147,8 @@ <inject-code class="target" position="beginning"> <insert-template name="fix_args,bool*"/> </inject-code> - <modify-argument index="return"> - <replace-type modified-type="(retval, timeOut)"/> + <modify-argument index="return" pyi-type="Tuple[bool, bool]"> + <replace-type modified-type="(retval, timedOut)"/> </modify-argument> </modify-function> diff --git a/sources/pyside6/PySide6/QtQml/typesystem_qml.xml b/sources/pyside6/PySide6/QtQml/typesystem_qml.xml index b9e5790d3..4df376890 100644 --- a/sources/pyside6/PySide6/QtQml/typesystem_qml.xml +++ b/sources/pyside6/PySide6/QtQml/typesystem_qml.xml @@ -193,7 +193,7 @@ <modify-argument index="1"> <remove-argument /> </modify-argument> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[any, bool]"> <replace-type modified-type="PyTuple"/> </modify-argument> <inject-code class="target" position="beginning"> @@ -255,7 +255,7 @@ <modify-argument index="1"> <remove-argument /> </modify-argument> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[float, bool]"> <replace-type modified-type="PyTuple"/> </modify-argument> <inject-code class="target" position="beginning"> @@ -266,7 +266,7 @@ <modify-argument index="1"> <remove-argument /> </modify-argument> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[bool, bool]"> <replace-type modified-type="PyTuple"/> </modify-argument> <inject-code class="target" position="beginning"> diff --git a/sources/pyside6/PySide6/QtQuick/typesystem_quick.xml b/sources/pyside6/PySide6/QtQuick/typesystem_quick.xml index 0054a205e..3a74964fa 100644 --- a/sources/pyside6/PySide6/QtQuick/typesystem_quick.xml +++ b/sources/pyside6/PySide6/QtQuick/typesystem_quick.xml @@ -58,7 +58,7 @@ <modify-argument index="2"> <remove-argument /> </modify-argument> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[bool, PySide6.QtGui.QTransform]"> <replace-type modified-type="PyTuple"/> </modify-argument> <inject-code class="target" position="beginning"> diff --git a/sources/pyside6/PySide6/QtWidgets/typesystem_widgets_common.xml b/sources/pyside6/PySide6/QtWidgets/typesystem_widgets_common.xml index 89073c6ce..657439935 100644 --- a/sources/pyside6/PySide6/QtWidgets/typesystem_widgets_common.xml +++ b/sources/pyside6/PySide6/QtWidgets/typesystem_widgets_common.xml @@ -319,7 +319,7 @@ <modify-argument index="1"> <remove-argument/> </modify-argument> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[bool, PySide6.QtWidgets.QGraphicsItem]"> <replace-type modified-type="(retval, blockingPanel)"/> </modify-argument> <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qgraphicsitem-isblockedbymodalpanel"/> @@ -329,7 +329,7 @@ <remove-argument /> <remove-default-expression /> </modify-argument> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[PySide6.QtGui.QTransform, bool]"> <replace-type modified-type="(QTransform, bool ok)"/> </modify-argument> <inject-code class="target" position="beginning"> @@ -544,7 +544,7 @@ <modify-argument index="1"> <remove-argument /> </modify-argument> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[bool, PySide6.QtGui.QFont]"> <replace-type modified-type="PyTuple"/> </modify-argument> <inject-code class="target" position="beginning"> @@ -555,7 +555,7 @@ <modify-argument index="1"> <remove-argument /> </modify-argument> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[bool, PySide6.QtGui.QFont]"> <replace-type modified-type="PyTuple"/> </modify-argument> <inject-code class="target" position="beginning"> @@ -2435,7 +2435,7 @@ <modify-function signature="getExistingDirectory(QWidget*,const QString&,const QString&,QFlags<QFileDialog::Option>)" allow-thread="yes"/> <modify-function signature="getExistingDirectoryUrl(QWidget*,const QString&,const QUrl&,QFlags<QFileDialog::Option>,const QStringList&)" allow-thread="yes"/> <modify-function signature="getOpenFileName(QWidget*,const QString&,const QString&,const QString&,QString*,QFlags<QFileDialog::Option>)" allow-thread="yes"> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[str, str]"> <replace-type modified-type="(fileName, selectedFilter)"/> </modify-argument> <modify-argument index="5"> @@ -2445,7 +2445,7 @@ <inject-code class="target" position="end" file="../glue/qtwidgets.cpp" snippet="qfiledialog-return" /> </modify-function> <modify-function signature="getOpenFileNames(QWidget*,const QString&,const QString&,const QString&,QString*,QFlags<QFileDialog::Option>)" allow-thread="yes"> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[List[str], str]"> <replace-type modified-type="(fileNames, selectedFilter)"/> </modify-argument> <modify-argument index="5"> @@ -2456,7 +2456,7 @@ </modify-function> <modify-function signature="getOpenFileUrl(QWidget*,const QString&,const QUrl&,const QString&,QString*,QFlags<QFileDialog::Option>,const QStringList&)" allow-thread="yes"> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[PySide6.QtCore.QUrl, str]"> <replace-type modified-type="(fileName, selectedFilter)"/> </modify-argument> <modify-argument index="5"> @@ -2467,7 +2467,7 @@ </modify-function> <modify-function signature="getOpenFileUrls(QWidget*,const QString&,const QUrl&,const QString&,QString*,QFlags<QFileDialog::Option>,const QStringList&)" allow-thread="yes"> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[List[PySide6.QtCore.QUrl], str]"> <replace-type modified-type="(fileName, selectedFilter)"/> </modify-argument> <modify-argument index="5"> @@ -2478,7 +2478,7 @@ </modify-function> <modify-function signature="getSaveFileName(QWidget*,const QString&,const QString&,const QString&,QString*,QFlags<QFileDialog::Option>)" allow-thread="yes"> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[str, str]"> <replace-type modified-type="(fileName, selectedFilter)"/> </modify-argument> <modify-argument index="5"> @@ -2489,7 +2489,7 @@ </modify-function> <modify-function signature="getSaveFileUrl(QWidget*,const QString&,const QUrl&,const QString&,QString*,QFlags<QFileDialog::Option>,const QStringList&)" allow-thread="yes"> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[PySide6.QtCore.QUrl, str]"> <replace-type modified-type="(fileName, selectedFilter)"/> </modify-argument> <modify-argument index="5"> diff --git a/sources/pyside6/PySide6/QtXml/typesystem_xml.xml b/sources/pyside6/PySide6/QtXml/typesystem_xml.xml index 4645f7b91..53cacb89a 100644 --- a/sources/pyside6/PySide6/QtXml/typesystem_xml.xml +++ b/sources/pyside6/PySide6/QtXml/typesystem_xml.xml @@ -33,7 +33,7 @@ <remove-argument/> <remove-default-expression/> </modify-argument> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[bool, str, int, int]"> <replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/> </modify-argument> <inject-code class="target" position="beginning" file="../glue/qtxml.cpp" snippet="qdomdocument-setcontent" /> @@ -51,7 +51,7 @@ <remove-argument/> <remove-default-expression/> </modify-argument> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[bool, str, int, int]"> <replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/> </modify-argument> <inject-code class="target" position="beginning" file="../glue/qtxml.cpp" snippet="qdomdocument-setcontent" /> @@ -69,7 +69,7 @@ <remove-argument/> <remove-default-expression/> </modify-argument> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[bool, str, int, int]"> <replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/> </modify-argument> <inject-code class="target" position="beginning" file="../glue/qtxml.cpp" snippet="qdomdocument-setcontent" /> @@ -87,7 +87,7 @@ <remove-argument/> <remove-default-expression/> </modify-argument> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[bool, str, int, int]"> <replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/> </modify-argument> <inject-code class="target" position="beginning" file="../glue/qtxml.cpp" snippet="qdomdocument-setcontent" /> @@ -105,7 +105,7 @@ <remove-argument/> <remove-default-expression/> </modify-argument> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[bool, str, int, int]"> <replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/> </modify-argument> <inject-code class="target" position="beginning" file="../glue/qtxml.cpp" snippet="qdomdocument-setcontent" /> @@ -123,7 +123,7 @@ <remove-argument/> <remove-default-expression/> </modify-argument> - <modify-argument index="return"> + <modify-argument index="return" pyi-type="Tuple[bool, str, int, int]"> <replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/> </modify-argument> <inject-code class="target" position="beginning" file="../glue/qtxml.cpp" snippet="qdomdocument-setcontent" /> |