Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[sipify] Correctly collapse TypeHint annotations
  • Loading branch information
nyalldawson committed Sep 18, 2020
1 parent 8ea72bb commit c293d2c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/core/auto_generated/geometry/qgscurvepolygon.sip.in
Expand Up @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions scripts/sipify.pl
Expand Up @@ -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");
};

Expand Down

0 comments on commit c293d2c

Please sign in to comment.