-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TYP: annotations in pandas.plotting #35935
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: annotations in pandas.plotting #35935
Conversation
from pandas.core.dtypes.common import is_list_like | ||
from pandas.core.dtypes.generic import ABCDataFrame, ABCIndexClass, ABCSeries | ||
|
||
from pandas.plotting._matplotlib import compat | ||
|
||
if TYPE_CHECKING: | ||
from matplotlib.table import Table |
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.
Revealed type is 'Any'
not sure what's best here. I imagine that once we get np.ndarray imports sorted, there'll be a lot of mypy errors to fix. I wonder whether we want to continue adding types that currently resolve to Any or leave untyped.
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.
ill follow your lead on this.
there are a lot of places in pd.plotting where we have a ax
arg that would be nice to disambiguate pd.Index
vs matplotlib.axes.Axes
vs matplotlib.axis.Axis
(i think most are Axes
)
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.
once we get np.ndarray imports sorted
is there cause for optimism this may be soon-ish?
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.
I'm not sure that we have got to any technical blocks yet since not much effort in this direction. Personally, I wanted to get the check_untyped_defs sorted first. (was a phase 0 in a plan) that imo comes before all other work. but in open source can't control the effort and therefore some have a preference for typing the public api. My interest in typing has always been for the internal consistency and quality of the pandas codebase itself.
But with hindsight, getting typing PRs through was so painfull that any typing additions is a bonus.
Thanks @jbrockmendel |
No description provided.