From 5e5c9d591e3d7a488a937098334aeb719704c636 Mon Sep 17 00:00:00 2001 From: Martijn Stegeman Date: Mon, 14 Oct 2024 19:58:14 +0200 Subject: [PATCH] Add double escape to string inside docstring --- checkpy/lib/basic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/checkpy/lib/basic.py b/checkpy/lib/basic.py index 0e94949..81c403e 100644 --- a/checkpy/lib/basic.py +++ b/checkpy/lib/basic.py @@ -232,7 +232,7 @@ def input(prompt=None): def removeWhiteSpace(s): warn("""checkpy.lib.removeWhiteSpace() is deprecated. Instead use: import re - re.sub(r"\s+", "", text) + re.sub(r"\\s+", "", text) """, DeprecationWarning, stacklevel=2) return re.sub(r"\s+", "", s, flags=re.UNICODE) @@ -240,7 +240,7 @@ def removeWhiteSpace(s): def getPositiveIntegersFromString(s): warn("""checkpy.lib.getPositiveIntegersFromString() is deprecated. Instead use: import re - [int(i) for i in re.findall(r"\d+", text)] + [int(i) for i in re.findall(r"\\d+", text)] """, DeprecationWarning, stacklevel=2) return [int(i) for i in re.findall(r"\d+", s)]