feat: Add types for snowflake.connector.connect#2271
Open
max-muoto wants to merge 6 commits intosnowflakedb:mainfrom
Open
feat: Add types for snowflake.connector.connect#2271max-muoto wants to merge 6 commits intosnowflakedb:mainfrom
snowflake.connector.connect#2271max-muoto wants to merge 6 commits intosnowflakedb:mainfrom
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
max-muoto
commented
Apr 16, 2025
| cap: int = DEFAULT_BACKOFF_CAP, | ||
| enable_jitter: bool = DEFAULT_ENABLE_JITTER, | ||
| ) -> Callable[..., Iterator[int]]: | ||
| ) -> Callable[[], Generator[int]]: |
Author
There was a problem hiding this comment.
Adding more accurate types in this module to make sure these functions will properly fulfill the annotation for backoff_policy
Contributor
sfc-gh-fpawlowski
left a comment
There was a problem hiding this comment.
Thank You for the PR, I left one comment.
| binding: str | None | ||
|
|
||
|
|
||
| class SnowflakeConnectionConfig(TypedDict): |
Contributor
There was a problem hiding this comment.
Did You have a look at the DEFAULT_CONFIGURATION dictionary? It already contains list of supported config parameters. Maybe both could be merged into one entity?
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.
Please answer these questions before submitting your pull requests. Thanks!
What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes SNOW-2043406: Type Annotations for
snowflake.connector.connect#2270Fill out the following pre-review checklist:
None are relevant, only adding type annotations)
Please describe how your code solves the related issue.
The PR adds missing type annotations, so that
snowflake.connector.connectand theImplementationclass properly match with both having full annotations using aTypedDictto avoid repeated types.(Optional) PR for stored-proc connector: