-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
#26020 Fixed type annotations for pandas.plotting._core #26021
Conversation
@@ -1723,7 +1724,8 @@ def result(self): | |||
_all_kinds = _common_kinds + _dataframe_kinds + _series_kinds | |||
|
|||
_klasses = [LinePlot, BarPlot, BarhPlot, KdePlot, HistPlot, BoxPlot, | |||
ScatterPlot, HexBinPlot, AreaPlot, PiePlot] | |||
ScatterPlot, HexBinPlot, AreaPlot, PiePlot] \ | |||
# type: List[Type[MPLPlot]] |
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.
Should just be List[MPLPlot]
I think - does that give you some kind of error?
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.
Yes, _klasses
contains the classes/types themselves, not instances of those types, so using List[MPLPlot]
errors out with lines like error: List item 0 has incompatible type "Type[LinePlot]"; expected "MPLPlot"
.
Codecov Report
@@ Coverage Diff @@
## master #26021 +/- ##
==========================================
- Coverage 91.82% 91.82% -0.01%
==========================================
Files 175 175
Lines 52539 52540 +1
==========================================
- Hits 48246 48243 -3
- Misses 4293 4297 +4
Continue to review full report at Codecov.
|
lgtm. @WillAyd |
mypy.ini
Outdated
[mypy-pandas.plotting._core] | ||
>>>>>>> origin/master |
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.
Merge conflict vestiges?
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.
Oops. Changed IDEs, forgot to turn on autosave.
Thanks @gwrome keep them coming! |
git diff upstream/master -u -- "*.py" | flake8 --diff