aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/backport_inspect.py
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2019-09-29 17:13:38 +0200
committerChristian Tismer <tismer@stackless.com>2019-09-30 19:00:00 +0200
commit3f31779af61c064c5bcbebaa588c7fd18a591b0d (patch)
treeb2eef8a6384bf379d9af18aa8bf4be4c7e1af515 /sources/shiboken2/shibokenmodule/files.dir/shibokensupport/backport_inspect.py
parent12300111a002926d38afb69e5addb60146f2b2a5 (diff)
Enable the Function Registry for 5.14 augmented
This patch fixes some small quirks and improves the scraping. Change-Id: Ia0366e2e29c833fe985353768de166fd538f0d24 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/shiboken2/shibokenmodule/files.dir/shibokensupport/backport_inspect.py')
-rw-r--r--sources/shiboken2/shibokenmodule/files.dir/shibokensupport/backport_inspect.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/backport_inspect.py b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/backport_inspect.py
index c690493b6..1f6d70b31 100644
--- a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/backport_inspect.py
+++ b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/backport_inspect.py
@@ -113,7 +113,9 @@ CO_NOFREE = 0x0040
# We use '__builtin__' and '__name__' instead.
def formatannotation(annotation, base_module=None):
if getattr(annotation, '__module__', None) == 'typing':
- return repr(annotation).replace('typing.', '')
+ # The replace must not be done on Python 2.7 because it
+ # already happens somewhere else.
+ return repr(annotation) ##.replace('typing.', '')
if isinstance(annotation, type):
if annotation.__module__ in ('__builtin__', base_module):
return annotation.__name__