From c293d2c60d164d09f1b2d692c31afa9f718ad02e Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Fri, 18 Sep 2020 08:30:20 +1000 Subject: [PATCH] [sipify] Correctly collapse TypeHint annotations --- python/core/auto_generated/geometry/qgscurvepolygon.sip.in | 2 +- scripts/sipify.pl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/core/auto_generated/geometry/qgscurvepolygon.sip.in b/python/core/auto_generated/geometry/qgscurvepolygon.sip.in index 318b3e8eae9..402e5b2b67e 100644 --- a/python/core/auto_generated/geometry/qgscurvepolygon.sip.in +++ b/python/core/auto_generated/geometry/qgscurvepolygon.sip.in @@ -86,7 +86,7 @@ Returns the curve polygon's exterior ring. %End - SIP_PYOBJECT interiorRing( int i ) /HoldGIL/ /TypeHint="QgsCurve"/; + SIP_PYOBJECT interiorRing( int i ) /HoldGIL,TypeHint="QgsCurve"/; %Docstring Retrieves an interior ring from the curve polygon. The first interior ring has index 0. diff --git a/scripts/sipify.pl b/scripts/sipify.pl index 3a73d3a6615..58e00f4b72b 100755 --- a/scripts/sipify.pl +++ b/scripts/sipify.pl @@ -458,9 +458,9 @@ sub fix_annotations { $line =~ s/SIP_THROW\(\s*(\w+)\s*\)/throw\( $1 \)/; # combine multiple annotations - # https://regex101.com/r/uvCt4M/4 + # https://regex101.com/r/uvCt4M/5 do {no warnings 'uninitialized'; - $line =~ s/\/([\w,]+(=\w+)?)\/\s*\/([\w,]+(=\w+)?)\//\/$1,$3\//; + $line =~ s/\/([\w,]+(=\"?\w+\"?)?)\/\s*\/([\w,]+(=\"?\w+\"?)?)\//\/$1,$3\//; (! $3) or dbg_info("combine multiple annotations -- works only for 2"); };