Skip to content

TYP: resolve ignored mypy errors in core/describe.py #46928

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

Merged
merged 1 commit into from
May 6, 2022

Conversation

iasoon
Copy link
Contributor

@iasoon iasoon commented May 2, 2022

xref #37715

Copy link
Member

@twoertwein twoertwein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small comment, looks good otherwise!

@iasoon iasoon force-pushed the typing/core-describe branch from 1be8d92 to 60e3879 Compare May 3, 2022 15:33
@@ -1667,7 +1667,7 @@ def _format_strings(self) -> list[str]:


def format_percentiles(
percentiles: (np.ndarray | list[int | float] | list[float] | list[str | float]),
percentiles: (np.ndarray | Sequence[float]),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was there a reason why the function was supposed to accept strings? @jreback I don't think it supports str as one of the first lines isnp.isclose(percentiles.astype(int), percentiles) which should fail for str (didn't try it)?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't remember. happy to eliminate it (assume we don't have tests / usage for this)

@twoertwein twoertwein added the Typing type annotations, mypy/pyright type checking label May 6, 2022
@jreback jreback added this to the 1.5 milestone May 6, 2022
@jreback jreback merged commit ddb315f into pandas-dev:main May 6, 2022
@jreback
Copy link
Contributor

jreback commented May 6, 2022

thanks @iasoon

yehoshuadimarsky pushed a commit to yehoshuadimarsky/pandas that referenced this pull request Jul 13, 2022
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.

3 participants