-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Mypy fix/io sql #28979
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
Mypy fix/io sql #28979
Conversation
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.
@aaditya-panik Thanks for the PR.
I think is you make the changes suggested, all the other changes can be reverted.
pandas/tests/io/test_sql.py
Outdated
flavor = "sqlite" | ||
mode = None | ||
flavor = "sqlite" # type: Optional[str] | ||
mode = None # type: Optional[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.
mode = None # type: Optional[str] | |
mode = None # type: str |
pandas/tests/io/test_sql.py
Outdated
@@ -1234,7 +1236,7 @@ class _TestSQLAlchemy(SQLAlchemyMixIn, PandasSQLTest): | |||
|
|||
""" | |||
|
|||
flavor = None | |||
flavor = None # type: Optional[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.
flavor = None # type: Optional[str] | |
flavor = None # type: str |
I will be creating and linking a new PR because I think I botched my forked repo branch. Will link the two PRs once I create the new one with the changes @simonjayhawkins suggested. |
@simonjayhawkins made the changes you suggested. Let me know if that works. |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff
As part of this PR, did the following:
Variable typing.
Code cleanup and reformatting the imports.
Internal class
_TestSQLAlchemyConn
behaves like an abstract class.To solve variable name clashing between parent classes in some of the errors, I restructured the inheritance from a structure like
to
Not sure why it was like that unless I'm missing something?