Skip to content

TYP: Fix type hint for params passed to read_sql_query #52357

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

Merged
merged 2 commits into from
Apr 10, 2023

Conversation

Tolker-KU
Copy link
Contributor

@Tolker-KU Tolker-KU changed the title Fix type hint for params passed to read_sql_query TYP: Fix type hint for params passed to read_sql_query Apr 2, 2023
@Tolker-KU Tolker-KU force-pushed the feature/read_sql_type_hint branch from 9a34687 to d52575d Compare April 2, 2023 13:19
@@ -357,7 +358,7 @@ def read_sql_query(
con,
index_col: str | list[str] | None = ...,
coerce_float=...,
params: list[str] | dict[str, str] | None = ...,
params: list[Any] | Mapping[str, Any] | None = ...,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the Any been made more specific?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mroeschke mroeschke added IO SQL to_sql, read_sql, read_sql_query Typing type annotations, mypy/pyright type checking labels Apr 3, 2023
@Tolker-KU Tolker-KU force-pushed the feature/read_sql_type_hint branch from d52575d to 20ed8ad Compare April 3, 2023 18:21
@Tolker-KU
Copy link
Contributor Author

CI failed due to a GitHub issue. Can someone rerun the checks?

@mroeschke mroeschke added this to the 2.1 milestone Apr 4, 2023
@mroeschke mroeschke merged commit c537b36 into pandas-dev:main Apr 10, 2023
@mroeschke
Copy link
Member

Thanks @Tolker-KU

@Tolker-KU Tolker-KU deleted the feature/read_sql_type_hint branch August 6, 2023 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO SQL to_sql, read_sql, read_sql_query Typing type annotations, mypy/pyright type checking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: pandas.read_sql_query type hint only allows str params
2 participants