-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
TYP: add return types to read_sql|read_sql_query|read_sql_table #34207
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
TYP: add return types to read_sql|read_sql_query|read_sql_table #34207
Conversation
WillAyd
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.
looks pretty good. I think the second overload in each case is unnecessary though
pandas/io/sql.py
Outdated
| ... | ||
|
|
||
|
|
||
| @overload |
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.
Hmm I don't think an overload should match the overloaded-signature should it? I think can delete?
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.
Yeah, that's right. I've updated the PR to remove all unneeded overloads.
790129a to
16d478d
Compare
| params=None, | ||
| parse_dates=None, | ||
| chunksize: None = None, | ||
| ) -> Iterator[DataFrame]: |
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.
are the return types of the two overloads switched? or have a misread the docstring?
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.
Yea looks like a copy / paste error? The other two funcs look correct.
lgtm outside of this issue
|
Yeah, that was a mistake. I've updated. |
|
Thanks @topper-123 |
Adds return types to read_sql|read_sql_query|read_sql_table.
I'd like to take on the other pd.read_* functions in follow-ups.