Skip to content

Conversation

@jbrockmendel
Copy link
Member

No description provided.

jbrockmendel and others added 30 commits August 20, 2020 21:19
@simonjayhawkins simonjayhawkins added the Typing type annotations, mypy/pyright type checking label Sep 1, 2020
ax = plt.gca(xlim=[-1, 1], ylim=[-1, 1])

to_plot = {}
to_plot: Dict[Label, List[List[Any]]] = {}
Copy link
Member

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.


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
Copy link
Member

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

Copy link
Member

@simonjayhawkins simonjayhawkins left a 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.

@simonjayhawkins simonjayhawkins added this to the 1.2 milestone Sep 1, 2020
Copy link
Member

@WillAyd WillAyd left a 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

@simonjayhawkins simonjayhawkins merged commit 303e40b into pandas-dev:master Sep 1, 2020
@simonjayhawkins
Copy link
Member

Thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the annotate-plotting-misc branch September 1, 2020 16:43
kesmit13 pushed a commit to kesmit13/pandas that referenced this pull request Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Typing type annotations, mypy/pyright type checking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants