From 74588e3ea9644c0f963404454df0cfe1544c84dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Thu, 2 Oct 2025 20:06:30 +0200 Subject: [PATCH] [scripts/pyprint] use triple quotes if string value contains `"` --- scripts/pyprint.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/pyprint.py b/scripts/pyprint.py index e49e0ebc..597193c2 100644 --- a/scripts/pyprint.py +++ b/scripts/pyprint.py @@ -7,8 +7,6 @@ # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. -import re - def pyprint(obj, indent=0, sort=None, oneline=True, lmin=0, lmax=16): @@ -26,7 +24,8 @@ def pyprint(obj, indent=0, sort=None, oneline=True, lmin=0, lmax=16): quote_beg = '"""\\\n' quote_end = '\\\n"""' elif '"' in obj: - obj = re.sub(r'(?