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

Conversation

njzjz
Copy link
Contributor

@njzjz njzjz commented May 16, 2024

/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/gromacs/fileformats/mdp.py:61: SyntaxWarning: invalid escape sequence '\s'
  COMMENT = re.compile("""\s*;\s*(?P<value>.*)""")  # eat initial ws
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/gromacs/fileformats/mdp.py:64: SyntaxWarning: invalid escape sequence '\s'
  """
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/gromacs/fileformats/ndx.py:89: SyntaxWarning: invalid escape sequence '\s'
  SECTION = re.compile("""\s*\[\s*(?P<name>\S.*\S)\s*\]\s*""")
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/gromacs/fileformats/xpm.py:122: SyntaxWarning: invalid escape sequence '\s'
  """\

njzjz added 2 commits May 15, 2024 22:14
```
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/gromacs/fileformats/mdp.py:61: SyntaxWarning: invalid escape sequence '\s'
  COMMENT = re.compile("""\s*;\s*(?P<value>.*)""")  # eat initial ws
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/gromacs/fileformats/mdp.py:64: SyntaxWarning: invalid escape sequence '\s'
  """
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/gromacs/fileformats/ndx.py:89: SyntaxWarning: invalid escape sequence '\s'
  SECTION = re.compile("""\s*\[\s*(?P<name>\S.*\S)\s*\]\s*""")
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/gromacs/fileformats/xpm.py:122: SyntaxWarning: invalid escape sequence '\s'
  """\
```
@njzjz
Copy link
Contributor Author

njzjz commented May 16, 2024

Failed tests are unrelated and are going to be fixed in #275.

Copy link
Member

@orbeckst orbeckst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix @njzjz — I am so sorry that I don't see the PRs.

When you put up a PR, just add a comment @orbeckst please review and then I get a notification.

@orbeckst orbeckst merged commit ea118ed into Becksteinlab:main Jun 15, 2024
2 of 15 checks passed
orbeckst pushed a commit that referenced this pull request Jun 15, 2024
* fix `SyntaxWarning: invalid escape sequence`

```
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/gromacs/fileformats/mdp.py:61: SyntaxWarning: invalid escape sequence '\s'
  COMMENT = re.compile("""\s*;\s*(?P<value>.*)""")  # eat initial ws
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/gromacs/fileformats/mdp.py:64: SyntaxWarning: invalid escape sequence '\s'
  """
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/gromacs/fileformats/ndx.py:89: SyntaxWarning: invalid escape sequence '\s'
  SECTION = re.compile("""\s*\[\s*(?P<name>\S.*\S)\s*\]\s*""")
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/gromacs/fileformats/xpm.py:122: SyntaxWarning: invalid escape sequence '\s'
  """\
```

* `\` should be removed when using `r`
orbeckst pushed a commit that referenced this pull request Jun 15, 2024
* fix `SyntaxWarning: invalid escape sequence`

```
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/gromacs/fileformats/mdp.py:61: SyntaxWarning: invalid escape sequence '\s'
  COMMENT = re.compile("""\s*;\s*(?P<value>.*)""")  # eat initial ws
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/gromacs/fileformats/mdp.py:64: SyntaxWarning: invalid escape sequence '\s'
  """
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/gromacs/fileformats/ndx.py:89: SyntaxWarning: invalid escape sequence '\s'
  SECTION = re.compile("""\s*\[\s*(?P<name>\S.*\S)\s*\]\s*""")
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/gromacs/fileformats/xpm.py:122: SyntaxWarning: invalid escape sequence '\s'
  """\
```

* `\` should be removed when using `r`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants