From b781bf54b54033917a020820f3bd7d4530bc0dc7 Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Mon, 30 Nov 2020 12:30:44 +0100 Subject: signature: avoid duplication of `__init__` After the reworking of error messages, the `__init__` function became visible both via the "class" and as "class.__init__". The constructor is treated specially because we want to list it first. Avoid duplicate generation of the constructor by filtering in "enum_sig.py". Change-Id: I04c0a47990d6ca8d97a748f7ecfe911f9aec2fe6 Task-number: PYSIDE-1305 Pick-to: 5.15 Reviewed-by: Cristian Maureira-Fredes --- .../shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 078617a84..6d832627e 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 @@ -151,7 +151,8 @@ class ExactEnumerator(object): self.fmt.class_name = class_name ret.update(self.function("__init__", klass)) for func_name, func in functions: - ret.update(self.function(func_name, func)) + if func_name != "__init__": + ret.update(self.function(func_name, func)) self.fmt.level -= 1 return ret -- cgit v1.2.3