Conversation
Clean up Client constructor
validate_email has not been updated since 2015.
horgh
requested changes
Jul 14, 2020
| @@ -26,17 +26,14 @@ | |||
| class Client: | |||
| """Client for accessing the minFraud Score and Insights web services.""" | |||
Member
Author
There was a problem hiding this comment.
I decided to delete "Score and Insights" as it also supports the report transactions endpoint and listing everything seemed a bit unwieldy.
| return s | ||
| raise ValueError | ||
| _rfc3339_datetime = Match( | ||
| r"\A\d{4}-\d{2}-\d{2}[Tt]\d{2}:\d{2}:\d{2}(\.\d+)?(?:[Zz]|[+-]\d{2}:\d{2})\Z" |
Contributor
There was a problem hiding this comment.
Would we perhaps want to use [0-9] instead of \d? I'm wondering if we could incorrectly accept more digit characters than expected. Perhaps it is unlikely to arise in practice.
Member
Author
There was a problem hiding this comment.
Good thought. I added the ASCII flag instead.
This obviously will still allow invalid timestamps as it only validates the structure, not the content. However, I think that is sufficient for this purpose.
horgh
approved these changes
Jul 14, 2020
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.
No description provided.