Repository navigation
_encode_uri_path_for_uss acknowledge encoding on a URI given as input - #415
Conversation
Signed-off-by: aadityasinha-dotcom <aadityasinha009@gmail.com>
traeok
left a comment
There was a problem hiding this comment.
While I'm not opposed to taking this approach, I noticed that urllib is already imported at the top. Could we use the urllib.parse function to detect URI encoding instead?
For example:
from urllib.parse import unquote, quote
def is_percent_encoded(text: str) -> bool:
"""Checks if a string contains valid percent-encoding."""
# unquote transforms '%20' to ' ' and returns a different string if encoding was present
return unquote(text) != textSigned-off-by: aadityasinha-dotcom <aadityasinha009@gmail.com>
Requested changes have been implemented.
traeok
left a comment
There was a problem hiding this comment.
Thanks Aaditya, all looks good and I'm ready to approve if tests pass. Can you please add a changelog entry to track the fix?
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #415 +/- ##
==========================================
+ Coverage 85.50% 85.53% +0.02%
==========================================
Files 49 49
Lines 2995 3001 +6
==========================================
+ Hits 2561 2567 +6
Misses 434 434
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Signed-off-by: aadityasinha-dotcom <aadityasinha009@gmail.com>
traeok
left a comment
There was a problem hiding this comment.
Thanks @aadityasinha-dotcom! LGTM
What It Does
Resolves #413
How to Test
Review Checklist
I certify that I have:
Additional Comments