From de7fa61ba1322f60f61af7be2bcd0eebb1822060 Mon Sep 17 00:00:00 2001 From: root_admin <87634669+godwins3@users.noreply.github.com> Date: Sat, 29 Jun 2024 17:16:32 +0300 Subject: [PATCH] fix: DeprecationWarning: invalid escape sequence '\+' fix this issue arising when running a test suite https://github.com/AfricasTalkingLtd/africastalking-python/issues/54#issue-2360913351 --- africastalking/Service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/africastalking/Service.py b/africastalking/Service.py index a596bd6..0b36800 100644 --- a/africastalking/Service.py +++ b/africastalking/Service.py @@ -16,7 +16,7 @@ def validate_amount(amount_str): def validate_phone(phone_str): try: - return re.match("^\+\d{1,3}\d{3,}$", phone_str) + return re.match(r"^\+\d{1,3}\d{3,}$", phone_str) is not None except ValueError: return False