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

[BUG] SyntaxWarning: invalid escape sequence #3213

Open
waldiTM opened this issue Sep 14, 2024 · 0 comments
Open

[BUG] SyntaxWarning: invalid escape sequence #3213

waldiTM opened this issue Sep 14, 2024 · 0 comments
Assignees

Comments

@waldiTM
Copy link

waldiTM commented Sep 14, 2024

Describe the bug: A clear and concise description of what the bug is.

Several parts throw SyntaxWarning. Someone even helpfully disabled the pylint warning for this problem.

All regular expressions must be creates as the correct string type: r"…".

azurelinuxagent/ga/env.py:40
  /build/source/azurelinuxagent/ga/env.py:40: SyntaxWarning: invalid escape sequence '\.'
    re.compile("^(.*)\.(\d+)\.(xml)$", re.IGNORECASE)  # pylint: disable=W1401

azurelinuxagent/agent.py:331
  /build/source/azurelinuxagent/agent.py:331: SyntaxWarning: invalid escape sequence '\w'
    m = re.match("^(?:[-/]*)configuration-path:([\w/\.\-_]+)", arg)  # pylint: disable=W1401
@narrieta narrieta self-assigned this Sep 16, 2024
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

No branches or pull requests

2 participants