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 regex deprecation warning #382

Closed
terriko opened this issue Feb 22, 2020 · 0 comments · Fixed by #393
Closed

Fix regex deprecation warning #382

terriko opened this issue Feb 22, 2020 · 0 comments · Fixed by #393
Labels
good first issue Good for newcomers

Comments

@terriko
Copy link
Contributor

terriko commented Feb 22, 2020

pytest tossed the following warning at me:

=============================== warnings summary ===============================
cve_bin_tool/cvedb.py:153
  /home/terri/Code/cve-bin-tool/cve_bin_tool/cvedb.py:153: DeprecationWarning: invalid escape sequence \/
    META_REGEX = re.compile("https:\/\/.*\/json\/.*-[0-9]*\.[0-9]*-[0-9]*\.meta")

-- Docs: https://docs.pytest.org/en/latest/warnings.html

We should probably fix that. I believe you just need to correct the string to add an r at the front so it's treated as a "raw" string.

So on line 153 above, change it to be r"https instaed of "https

@terriko terriko changed the title regex deprecation warning Fix regex deprecation warning Feb 22, 2020
@terriko terriko added the good first issue Good for newcomers label Feb 22, 2020
terriko pushed a commit that referenced this issue Feb 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant