diff options
author | Łukasz Patron <priv.luk@gmail.com> | 2025-05-22 20:55:57 +0200 |
---|---|---|
committer | Łukasz Patron <priv.luk@gmail.com> | 2025-05-23 12:11:44 +0200 |
commit | 15d8acf860456f4f49a7487505b651cb939b535f (patch) | |
tree | 4bac77375ced3015e35c9e5e3b2a47df90a73d8b /sources | |
parent | 78825180c57f0e05a31bf99217210686e0314490 (diff) |
Fixes the following error on Python 3.14:
TypeError: typing.Optional requires a single type. Got (<class
'PySide6.QtGui.QKeySequence'>, <class 'PySide6.QtCore.QKeyCombination'>,
<enum 'StandardKey'.
Change-Id: Id1fe45d31cc38a337caa55a86f509c3f88c0b683
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Łukasz Patron <priv.luk@gmail.com>
Diffstat (limited to 'sources')
-rw-r--r-- | sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/layout.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/layout.py b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/layout.py index 109562a98..8eea431c3 100644 --- a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/layout.py +++ b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/layout.py @@ -352,6 +352,7 @@ def create_signature_union(props, key): if last == _VAR_POSITIONAL: kind = _KEYWORD_ONLY if default is None: + ann = typing.Union[ann] ann = typing.Optional[ann] if default is not _empty and layout.ellipsis: default = ellipsis @@ -373,6 +374,7 @@ def create_signature_union(props, key): ret_anno = annotations.get('return', _empty) if ret_anno is not _empty and props["fullname"] in missing_optional_return: + ret_anno = typing.Union[ret_anno] ret_anno = typing.Optional[ret_anno] return inspect.Signature(params, return_annotation=ret_anno, __validate_parameters__=False) |