Skip to content

Commit cf7951d

Browse files
committed
Summary: Make regex string more pythonic by making it raw.
1 parent 8555988 commit cf7951d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

services/post_service.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ def make_postcard_object(file: str, clip_len: Optional[int] = None, img_picker:
6363
if h3.get_text() == "Citation":
6464
p = h3.findNext("p").get_text()
6565
if p is not None:
66-
if re.match('^\D*[0-9]{4}\\.', p) is not None:
67-
data_author = re.match('^\D*[0-9]{4}\\.', p).group()
66+
if re.match(r"^\D*[0-9]{4}\.", p) is not None:
67+
data_author = re.match(r"^\D*[0-9]{4}\.", p).group()
6868
image = soup.find("img", id=img_picker)
6969
if image is None:
7070
image = soup.find("img")

0 commit comments

Comments
 (0)