Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.7k
♻ Simplify internal RegEx infastapi/utils.py#5057
Conversation
codecovbot commentedJun 20, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov Report
@@ Coverage Diff @@## master #5057 +/- ##========================================= Coverage 100.00% 100.00% ========================================= Files 532 532 Lines 13672 13672 ========================================= Hits 13672 13672
Continue to review full report at Codecov.
|
📝 Docs preview for commit9786b7f at:https://62afeb41aa8c7445d0b7c931--fastapi.netlify.app |
JarroVGIT left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Agree,\W is the equivalent of[^a-zA-Z0-9_] and is more elegant.
lucaswiman commentedJun 24, 2022
No, that's not true. It's equivalent to >>>importre>>>re.match(r'\W','ü')>>>re.match(r'\w','ü')<re.Matchobject;span=(0,1),match='ü'> This change may lead to better support for languages with non-ASCII characters, but it's not precisely equivalent to the old code. |
JarroVGIT commentedJun 24, 2022
I stand corrected. I took my information from regex101.com, and you are completely right. If this changes the behaviour, then I would expect a test case that would illustrate the exact intended behaviour. |
tiangolo commentedAug 26, 2022
Great, thanks@pylounge! 🍰 |
Replace regex for simple