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

ScanQR: Modification of regex throwing warning #253

Merged
merged 6 commits into from
Dec 20, 2022

Conversation

phutelmyer
Copy link
Contributor

Describe the change
Update url regular expression in ScanQR to fix warning observed during tests:

=============================== warnings summary ===============================
/strelka/strelka/scanners/scan_qr.py:19: DeprecationWarning: invalid escape sequence '\/'
  URL_REGEX = '^((https?|ftp|smtp):\/\/)?(www.)?[a-z0-9]+\.[a-z]+(\/[a-zA-Z0-9#]+\/?)*'

The updated regular expression will match the same addresses as before, it's just removing extraneous escape characters.

Describe testing procedures
Submitted several QR documents to Strelka.

Sample output
N/A

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of and tested my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@phutelmyer phutelmyer self-assigned this Dec 20, 2022
@phutelmyer phutelmyer added the bug Something isn't working label Dec 20, 2022
@phutelmyer phutelmyer merged commit 325cc96 into master Dec 20, 2022
@phutelmyer phutelmyer deleted the scanqr-regex-update branch December 30, 2022 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant