diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2025-08-14 10:03:42 +0200 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2025-08-14 10:27:02 +0200 |
| commit | 257fed9da435df6bb3aa048da2bed956bd279e6f (patch) | |
| tree | 97343758cd6e41a934575c9de181164f9f84f987 | |
| parent | f3a9594ad324ec5738567b2598b76bf305664fd9 (diff) | |
Revert "type-hints: Use Iterable instead of Sequence"
This reverts commit d563bfbd200ecd1ae538479b5031e88272c9ed37.
For 6.10, it creates an ambiguous signature for
QDBusArgument::operator<<(QList<QVariant>)->QDBusArgument&
QDBusArgument::operator<<(QStringList)->QDBusArgument&
and using iterable for containers other than QStringList and numpy
is incorrect.
Pick-to: 6.9 6.8
Task-number: PYSIDE-3140
Change-Id: Id0732ac483b6b2928fe5a3943dfd61e03885d5fb
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| -rw-r--r-- | sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/parser.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/parser.py b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/parser.py index 23135aa43..17ee44415 100644 --- a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/parser.py +++ b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/parser.py @@ -420,7 +420,7 @@ def handle_argvar(obj): Currently, the best approximation is types.Sequence. We want to change that to types.Iterable in the near future. """ - return _handle_generic(obj, collections.abc.Iterable) + return _handle_generic(obj, collections.abc.Sequence) def handle_retvar(obj): @@ -504,7 +504,7 @@ def fix_variables(props, line): for idx, name in enumerate(varnames): ann = safe_annos[name] if isinstance(ann, ArrayLikeVariable): - ann = collections.abc.Iterable[ann.type] + ann = collections.abc.Sequence[ann.type] annos[name] = ann if not isinstance(ann, ResultVariable): continue |
