Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix escape warnings #3911

Merged
merged 1 commit into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions backend/mlarchive/archive/backends/elasticsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
from mlarchive.archive.utils import get_noauth

logger = logging.getLogger(__name__)
IDENTIFIER_REGEX = re.compile('^[\w\d_]+\.[\w\d_]+\.[\w\d-]+$')
IDENTIFIER_REGEX = re.compile(r'^[\w\d_]+\.[\w\d_]+\.[\w\d-]+$')


def prep_text(message):
'''Prepare the "text" field that is used as the default field for
'''Prepare the "text" field that is used as the default field for
search queries, ie. no field designator'''
return '\n'.join([message.frm, message.subject, message.get_body()])

Expand Down
2 changes: 1 addition & 1 deletion backend/mlarchive/archive/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ class CustomMbox(mailbox.mbox):
argument which is a compiled regex object representing the new message indicator.

A standard mbox will match this expression
'^From .* (Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s.+'
'^From .* (Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s.+'

NOTE: we exclude false matches to lines like:
From your message Mon, 9 Nov 1998 06:09:48 -0000:
Expand Down
Loading