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.
CLN: Fixing mypy errors in pandas/conftest.py #29046
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
CLN: Fixing mypy errors in pandas/conftest.py #29046
Changes from 6 commits
bfc175e
6408388
f4afbb2
ce2d9b7
96a09ec
f07b7a0
77543f2
50dadb2
5bce559
1856a58
4be05dc
3fbf980
05bb32b
4b8b565
a920f28
dd279e9
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Somewhat more complicated but the
ExtensionDtype
needs to be an instance, so should exclude from theType
element.To illustrate:
cc @TomAugspurger in case there's something I'm missing with the ExtensionDtype
Also @simonjayhawkins do you mind if we include
int
in the Union? Understood that it gets replaced as part of the mypy type hierarchy, but givendtype=int
is a valid construct it serves as literal documentation and requires less knowledge of how mypy works. Whenever we get to Python 3.8 as the min version these should be converted toLiteral
annotations anywayThere 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.
should probably raise. I don't think we can automatically make that work since we have parametrized dtypes. Not sure what that does to the type hint.
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.
no problem.
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.
👋 Sorry for the silence on my end. I'm picking this up again now. I didn't follow your comment, @WillAyd (though I committed your suggestion - hence the
Outdated
flag). Does this requested review still apply? Thanks.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.
will need to change to py3.6 syntax.
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.
same