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 deprecated escape sequences in msg #427

Open
ChrisTimperley opened this issue Oct 20, 2020 · 1 comment
Open

Fix deprecated escape sequences in msg #427

ChrisTimperley opened this issue Oct 20, 2020 · 1 comment
Assignees

Comments

@ChrisTimperley
Copy link
Member

================================================================================= warnings summary =================================================================================
src/roswire/common/msg.py:24
src/roswire/common/msg.py:24
src/roswire/common/msg.py:24
  /home/chris/tools/roswire/src/roswire/common/msg.py:24: DeprecationWarning: invalid escape sequence \s
    R_FIELD = re.compile(f"^\s*({R_TYPE})\s+({R_NAME})\s*{R_COMMENT}$")

src/roswire/common/msg.py:25
  /home/chris/tools/roswire/src/roswire/common/msg.py:25: DeprecationWarning: invalid escape sequence \s
    R_STRING_CONSTANT = re.compile("^\s*string\s+(\w+)\s*=\s*(.+)\s*$")

src/roswire/common/msg.py:26
  /home/chris/tools/roswire/src/roswire/common/msg.py:26: DeprecationWarning: invalid escape sequence \s
    R_OTHER_CONSTANT = re.compile("^\s*(\w+)\s+(\w+)\s*=\s*([^\s]+).*$")

src/roswire/common/msg.py:27
  /home/chris/tools/roswire/src/roswire/common/msg.py:27: DeprecationWarning: invalid escape sequence \s
    R_BLANK = re.compile(f"^\s*{R_COMMENT}$")

src/roswire/common/roslaunch/rosparam.py:48
  /home/chris/tools/roswire/src/roswire/common/roslaunch/rosparam.py:48: DeprecationWarning: invalid escape sequence \(
    '!degrees', re.compile('^deg\([^\)]*\)$'), first='deg(')

src/roswire/common/roslaunch/rosparam.py:51
  /home/chris/tools/roswire/src/roswire/common/roslaunch/rosparam.py:51: DeprecationWarning: invalid escape sequence \(
    '!radians', re.compile('^rad\([^\)]*\)$'), first='rad(')

-- Docs: https://docs.pytest.org/en/stable/warnings.html
@tirkarthi
Copy link

Deprecation warnings are raised due to invalid escape sequences. This can be fixed by using raw strings or escaping the literals. pyupgrade also helps in automatic conversion : https://github.com/asottile/pyupgrade/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants