aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/PySide2/support
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-02-23 16:23:48 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-02-23 16:23:52 +0100
commit4917f84cfa8d526e34e3a6d2164ecf2e23eab408 (patch)
tree21b6fc428ab75e38d1cee031ef767ed38e443044 /sources/pyside2/PySide2/support
parent32a2eb95758f7beb13b54053bfa97c9bc973b9f0 (diff)
parent784df63e6be7339df3872a56baf89ca81c7e7199 (diff)
Merge remote-tracking branch 'origin/5.6' into 5.9
Diffstat (limited to 'sources/pyside2/PySide2/support')
-rw-r--r--sources/pyside2/PySide2/support/signature/parser.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/sources/pyside2/PySide2/support/signature/parser.py b/sources/pyside2/PySide2/support/signature/parser.py
index c55973632..b067f245b 100644
--- a/sources/pyside2/PySide2/support/signature/parser.py
+++ b/sources/pyside2/PySide2/support/signature/parser.py
@@ -82,10 +82,18 @@ def _parse_line(line):
"""
ret = re.match(line_re, line, re.VERBOSE).groupdict()
arglist = ret["arglist"]
+ # The following is a split re. The string is broken into pieces which are
+ # between the recognized strings. Because the re has groups, both the
+ # strings and the delimiters are returned, where the strings are not
+ # interesting at all: They are just the commata.
+ # Note that it is necessary to put the characters with special handling in
+ # the first group (comma, brace, angle bracket).
+ # Then they are not recognized there, and we can handle them differently
+ # in the following expressions.
arglist = list(x.strip() for x in re.split(r"""
(
(?: # inner group is not capturing
- [^,()] # no commas or braces
+ [^,()<>] # no commas or braces or angle brackets
|
\(
(?:
@@ -96,6 +104,10 @@ def _parse_line(line):
\)
)*
\)
+ |
+ < # or one angle bracket pair
+ [^<>]*
+ >
)+ # longest possible span
) # this list is interspersed with "," and surrounded by ""
""", arglist, flags=re.VERBOSE)