-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Improve stubs for braintree.environment
#10907
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
Conversation
This comment has been minimized.
This comment has been minimized.
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, optional suggestions below.
is_ssl: Any | ||
ssl_certificate: 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.
To get rid of the Any
s (which should be Incomplete
s):
is_ssl: Any | |
ssl_certificate: Any | |
is_ssl: bool | |
ssl_certificate: bool | str | None |
ssl_certificate
is passed to request's send()
method, which takes bool | str | None
as verify
argument:
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.
Hmmm, just because it's passed to send()
doesn't mean that bool | str | None
is the correct type, though -- maybe it's always a str
, in which case bool | str | None
will cause false positives. For now, I think I'll just use Incomplete
for ssl_certificate
is_ssl: Any | ||
ssl_certificate: Any | ||
def __init__( | ||
self, name, server, port, auth_url, is_ssl, ssl_certificate, graphql_server: str = "", graphql_port: str = "" | ||
self, name, server: str, port, auth_url: str, is_ssl, ssl_certificate, graphql_server: str = "", graphql_port: str = "" |
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.
self, name, server: str, port, auth_url: str, is_ssl, ssl_certificate, graphql_server: str = "", graphql_port: str = "" | |
self, name, server: str, port, auth_url: str, is_ssl: bool, ssl_certificate: bool | str | None, graphql_server: str = "", graphql_port: str = "" |
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Fixes #10905