fix: replace invalid escape sequences in docstrings#782
Open
Subh24ai wants to merge 1 commit intoOWASP:mainfrom
Open
fix: replace invalid escape sequences in docstrings#782Subh24ai wants to merge 1 commit intoOWASP:mainfrom
Subh24ai wants to merge 1 commit intoOWASP:mainfrom
Conversation
Replace bare \d and \S in docstrings with escaped versions \d and \S to fix DeprecationWarning: invalid escape sequence in Python 3.12+ Affected files: - application/database/db.py: line 1809 - application/web/web_main.py: line 467
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Two docstrings contained bare
\dand\Sescape sequences in regularstrings, causing
DeprecationWarning: invalid escape sequencein Python 3.12+.These warnings appeared in every test run.
Fix
Replaced bare escape sequences with properly escaped versions (
\\d,\\S)in docstrings:
application/database/db.pyline 1809application/web/web_main.pyline 467Verification
109 tests passing.