summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCristian Maureira-Fredes <cristian.maureira-fredes@qt.io>2018-12-04 09:49:48 +0100
committerCristian Maureira-Fredes <cristian.maureira-fredes@qt.io>2018-12-05 08:51:13 +0000
commitcab2bd2bcb7c5638b018560bbe3fb61ce96bb028 (patch)
tree734fcc8b764b480be66d02105ec453bb73214f1f
parentfe0c357d1bfb109520e5ef3ae4cd4556819fb5d1 (diff)
Avoid DeprecationWarning in Python 3
The re.match(...) string raised a DeprecationWarning due to the escaped '\(' inside the pattern in Python 3. Using a raw-string instead solved this issue. Change-Id: Ib7f6c66bfdaa03f154ce086abf7ca9bd0baaeb47 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
-rw-r--r--sources/pyside2/PySide2/support/generate_pyi.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sources/pyside2/PySide2/support/generate_pyi.py b/sources/pyside2/PySide2/support/generate_pyi.py
index 7a2c79ba..bd3e7500 100644
--- a/sources/pyside2/PySide2/support/generate_pyi.py
+++ b/sources/pyside2/PySide2/support/generate_pyi.py
@@ -159,7 +159,7 @@ class Formatter(Writer):
def _function(self, func_name, signature, spaces):
# this would be nicer to get somehow together with the signature
- is_meth = re.match("\((\w*)", str(signature)).group(1) == "self"
+ is_meth = re.match(r"\((\w*)", str(signature)).group(1) == "self"
if self.class_name and not is_meth:
self.print('{spaces}@staticmethod'.format(**locals()))
self.print('{spaces}def {func_name}{signature}: ...'.format(**locals()))