aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/lib/pyi_generator.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/lib/pyi_generator.py b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/lib/pyi_generator.py
index 3ca92f47a..c72946f7c 100644
--- a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/lib/pyi_generator.py
+++ b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/lib/pyi_generator.py
@@ -203,8 +203,9 @@ class Formatter(Writer):
@contextmanager
def attribute(self, attr_name, attr_value):
spaces = indent * self.level
- # PYSIDE-2846: The comment "# type:" is reserved for mypy.
- self.print(f"{spaces}{attr_name:25} = ... ## type: {type(attr_value).__qualname__}")
+ # PYSIDE-2903: Use a fully qualified name in the type comment.
+ full_name = f"{type(attr_value).__module__}.{type(attr_value).__qualname__}"
+ self.print(f"{spaces}{attr_name:25} = ... # type: {full_name}")
yield
@contextmanager