-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Improve oauthlib.common
#13744
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
Improve oauthlib.common
#13744
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
srittau
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.
Thanks, comments below.
stubs/oauthlib/oauthlib/common.pyi
Outdated
| body: str | dict[str, str] | list[tuple[str, str]] | None | ||
| decoded_body: list[tuple[str, str]] | None | ||
| oauth_params: list[str] | ||
| validator_log: dict[str, Any] |
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.
Any needs 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.
I changed it to object, an example of defining value can be found for example in oauthlib.oauth1.rfc5849.endpoints.resource.ResourceEndpoint.validate_protected_resource_request
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.
oh I just thought that maybe someone would want to pass a result that could be None, should I add | None for value?
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.
object isn't correct, since it would mean that every key can have any object. A suitable comment could be as simple as "# value type depends on the key".
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
No description provided.