diff options
| author | Adrian Herrmann <adrian.herrmann@qt.io> | 2023-07-11 15:12:26 +0200 |
|---|---|---|
| committer | Adrian Herrmann <adrian.herrmann@qt.io> | 2023-07-13 16:37:04 +0200 |
| commit | dd58b46b737e5b0616d790b83cefb9e594433abb (patch) | |
| tree | 9358ce1a9b763e10eae63fa311346045c933ae7b | |
| parent | 63ef7628091c8827e3d0d688220d3ae165587eb2 (diff) | |
Fix empty stub for QtCore.QCborTag (without ...)
_member_type_ is the only member of the QtCore.QCborTag class, causing
the stub to be printed empty without ..., as will be wrongly assumed
that the body is not empty. Skip _member_type_ to avoid this problem.
Change-Id: I641037b041fccbc02adaad4b501aa2045ba318c3
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
| -rw-r--r-- | sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py index 598e1480f..d07beb881 100644 --- a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py +++ b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py @@ -130,6 +130,12 @@ class ExactEnumerator(object): if signal_check(thing): signals.append((thing_name, thing)) elif inspect.isclass(thing): + # If this is the only member of the class, it causes the stub + # to be printed empty without ..., as self.fmt.have_body will + # then be True. (Example: QtCore.QCborTag). Skip it to avoid + # this problem. + if thing_name == "_member_type_": + continue subclass_name = ".".join((class_name, thing_name)) subclasses.append((subclass_name, thing)) elif inspect.isroutine(thing): |
