From 340f3cfe5d04eccb6f13f55fe2faaaa64c323e88 Mon Sep 17 00:00:00 2001 From: Wilson Freitas Date: Sat, 17 Feb 2024 10:13:23 -0300 Subject: [PATCH] added r to regex strings --- parse.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/parse.py b/parse.py index b5eab3a..191dd7c 100644 --- a/parse.py +++ b/parse.py @@ -12,7 +12,7 @@ g = Github(os.environ['GITHUB_ACCESS_TOKEN']) def extract_repo(url): - reu = re.compile('^https://github.com/([\w-]+/[-\w\.]+)$') + reu = re.compile(r'^https://github.com/([\w-]+/[-\w\.]+)$') m = reu.match(url) if m: return m.group(1) @@ -63,8 +63,8 @@ class Project(Thread): projects = [] with open('README.md', 'r', encoding='utf8') as f: - ret = re.compile('^(#+) (.*)$') - rex = re.compile('^\s*- \[(.*)\]\((.*)\) - (.*)$') + ret = re.compile(r'^(#+) (.*)$') + rex = re.compile(r'^\s*- \[(.*)\]\((.*)\) - (.*)$') m_titles = [] last_head_level = 0 for line in f: