diff options
author | Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2018-12-04 09:49:48 +0100 |
---|---|---|
committer | Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2018-12-05 08:51:13 +0000 |
commit | cab2bd2bcb7c5638b018560bbe3fb61ce96bb028 (patch) | |
tree | 734fcc8b764b480be66d02105ec453bb73214f1f /sources | |
parent | fe0c357d1bfb109520e5ef3ae4cd4556819fb5d1 (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>
Diffstat (limited to 'sources')
-rw-r--r-- | sources/pyside2/PySide2/support/generate_pyi.py | 2 |
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 7a2c79ba2..bd3e7500a 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())) |