Skip to content

SNOW-2043406: Type Annotations for snowflake.connector.connect #2270

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

Open
max-muoto opened this issue Apr 16, 2025 · 1 comment · May be fixed by #2271
Open

SNOW-2043406: Type Annotations for snowflake.connector.connect #2270

max-muoto opened this issue Apr 16, 2025 · 1 comment · May be fixed by #2271
Assignees
Labels
enhancement The issue is a request for improvement or a new feature status-pr_pending_merge A PR is made and is under review status-triage_done Initial triage done, will be further handled by the driver team

Comments

@max-muoto
Copy link

max-muoto commented Apr 16, 2025

What is the current behavior?

snowflake.connect lacks any type annotations, despite usage of **kwargs it's possible to share annotations between SnowflakeConnection and snowflake.connect through usage of Unpack.

What is the desired behavior?

That snowflake.connect is properly annotated making type-checkers such as MyPy and Pyright raise type-checking warnings when incorrect arguments are parsed in.

How would this improve snowflake-connector-python?

Users relying on type-checkers or Pylance would get linting errors for invalid arguments without having to execute code. Additionally, by having py.typed the package indicates it's properly typed however in this case proper annotations are missing.

@github-actions github-actions bot changed the title Type Annotations for snowflake.connect SNOW-2043406: Type Annotations for snowflake.connect Apr 16, 2025
@max-muoto max-muoto changed the title SNOW-2043406: Type Annotations for snowflake.connect Type Annotations for snowflake.connector.connect Apr 16, 2025
@max-muoto max-muoto linked a pull request Apr 16, 2025 that will close this issue
7 tasks
@sfc-gh-dszmolka sfc-gh-dszmolka self-assigned this Apr 16, 2025
@sfc-gh-dszmolka sfc-gh-dszmolka added status-triage_done Initial triage done, will be further handled by the driver team enhancement The issue is a request for improvement or a new feature and removed needs triage feature labels Apr 16, 2025
@sfc-gh-dszmolka
Copy link
Contributor

hi - thanks for raising this and also especially for the PR too!

@sfc-gh-dszmolka sfc-gh-dszmolka added the status-pr_pending_merge A PR is made and is under review label Apr 16, 2025
@sfc-gh-dszmolka sfc-gh-dszmolka changed the title Type Annotations for snowflake.connector.connect SNOW-2043406: Type Annotations for snowflake.connector.connect Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is a request for improvement or a new feature status-pr_pending_merge A PR is made and is under review status-triage_done Initial triage done, will be further handled by the driver team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants