-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TYP: annotate plotting._matplotlib.misc #36017
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: annotate plotting._matplotlib.misc #36017
Conversation
pandas/plotting/_matplotlib/misc.py
Outdated
@@ -130,7 +146,7 @@ def normalize(series): | |||
if ax is None: | |||
ax = plt.gca(xlim=[-1, 1], ylim=[-1, 1]) | |||
|
|||
to_plot = {} | |||
to_plot: Dict[Label, List[List[Any]]] = {} |
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.
Any? from matplotlib scatter, x, y : float or array-like, shape (n, )
vendoring https://github.com/predictive-analytics-lab/data-science-types/blob/master/matplotlib-stubs/axes.pyi might help.
maybe just Dict[Label, List[List]] while we don't enforce adding type parameters and we can revisit this later, rather than adding Any which maybe harder to track.
@@ -11,7 +11,7 @@ | |||
|
|||
|
|||
def _get_standard_colors( | |||
num_colors=None, colormap=None, color_type="default", color=None | |||
num_colors=None, colormap=None, color_type: str = "default", color=None |
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.
another potential use of Literal
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.
Thanks @jbrockmendel lgtm except use of Any which maybe hard to track.
…notate-plotting-misc
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.
lgtm merge on green
Thanks @jbrockmendel |
No description provided.