[sipify] Correctly collapse TypeHint annotations

This commit is contained in:
Nyall Dawson 2020-09-18 08:30:20 +10:00
parent 8ea72bb9eb
commit c293d2c60d
2 changed files with 3 additions and 3 deletions

View File

@ -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.

View File

@ -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");
};