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 SyntaxWarning: invalid escape sequence #274

Merged
merged 2 commits into from
Jun 15, 2024
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
2 changes: 1 addition & 1 deletion gromacs/fileformats/mdp.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class MDP(odict, utilities.FileUtils):
COMMENT = re.compile("""\s*;\s*(?P<value>.*)""") # eat initial ws
# see regex in cbook.edit_mdp()
PARAMETER = re.compile(
"""
r"""
\s*(?P<parameter>[^=]+?)\s*=\s* # parameter (ws-stripped), before '='
(?P<value>[^;]*) # value (stop before comment=;)
(?P<comment>\s*;.*)? # optional comment
Expand Down
2 changes: 1 addition & 1 deletion gromacs/fileformats/ndx.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class NDX(odict, utilities.FileUtils):
default_extension = "ndx"

# match: [ index_groupname ]
SECTION = re.compile("""\s*\[\s*(?P<name>\S.*\S)\s*\]\s*""")
SECTION = re.compile(r"""\s*\[\s*(?P<name>\S.*\S)\s*\]\s*""")

#: standard ndx file format: 15 columns
ncol = 15
Expand Down
2 changes: 1 addition & 1 deletion gromacs/fileformats/xpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class XPM(utilities.FileUtils):
#:
#: .. _`printable ASCII character`: http://www.danshort.com/ASCIImap/indexhex.htm
COLOUR = re.compile(
"""\
r"""
^.*" # start with quotation mark
(?P<symbol>[\x20-\x7E])# printable ASCII symbol used in the actual pixmap: 'space' to '~'
\s+ # white-space separated
Expand Down
Loading