aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2025-03-19 12:08:41 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2025-03-19 21:03:13 +0000
commitf325c0f0f185c49be0e4a40204b10bc60a98f064 (patch)
treea0ee74bc051de0740d6b75e6fbe6d38757e8ac46 /sources/pyside6
parent56e11bab46c85d6da7ad9004a7dbf50d6e7b416e (diff)
type hints: Fix an old typo in typesystem_core_common.xml
Instead of typing.Iterable, typing.List must be used in the return type of QtCore.findchildren. As a drive-by, the name "PlaceholderType" was corrected because "placeholder" is only one word. The new calculation of Optional replacement was also fixed to handle return types. Note: The Optional[PlaholderType] is special, and typing refuses to use "|" here. Change-Id: I9f7d89027496f3cae58710595d7bcaafb0e51915 Fixes: PYSIDE-3045 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 1001b0bf0b073bb41beaf32964690b155d790edc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 0e764101d80ec1f9aae66d3362a5a9cb56611ce2)
Diffstat (limited to 'sources/pyside6')
-rw-r--r--sources/pyside6/PySide6/QtCore/typesystem_core_common.xml6
1 files changed, 3 insertions, 3 deletions
diff --git a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
index 791a7799f..d8cadc6f6 100644
--- a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
+++ b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
@@ -1841,7 +1841,7 @@
<inject-documentation format="target" mode="append"
file="../doc/qtcore.rst" snippet="qobject-findChild"/>
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-findchild-2"/>
- <modify-argument index="return" pyi-type="Optional[PlaceHolderType]">
+ <modify-argument index="return" pyi-type="Optional[PlaceholderType]">
<parent index="this" action="add"/>
</modify-argument>
</add-function>
@@ -1851,14 +1851,14 @@
Like the method *findChild*, the first parameter should be the child's type.
</inject-documentation>
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-findchildren"/>
- <modify-argument index="return" pyi-type="Iterable[PlaceHolderType]">
+ <modify-argument index="return" pyi-type="List[PlaceholderType]">
<parent index="this" action="add"/>
</modify-argument>
</add-function>
<add-function signature="findChildren(PyTypeObject*@type@,const QRegularExpression&amp;@pattern@,Qt::FindChildOptions@options@=Qt::FindChildrenRecursively)"
return-type="PySequence*" >
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-findchildren"/>
- <modify-argument index="return" pyi-type="Iterable[PlaceHolderType]">
+ <modify-argument index="return" pyi-type="List[PlaceholderType]">
<parent index="this" action="add"/>
</modify-argument>
</add-function>