Skip to content

BUG: breaking type annotation of format_percentiles function in io/formats/format.py #57248

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

Closed
3 tasks done
MarkBekooy opened this issue Feb 4, 2024 · 1 comment · Fixed by #57249
Closed
3 tasks done
Labels
Bug good first issue Typing type annotations, mypy/pyright type checking

Comments

@MarkBekooy
Copy link
Contributor

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

Open `io/formats/format.py` file and see that the following:

def format_percentiles(
    percentiles: (np.ndarray | Sequence[float]),
) -> list[str]:

Issue Description

The brackets of (np.ndarray | Sequence[float]) should be removed as they break the libcst parser and they are unneccesary

Expected Behavior

Removed brackets

Installed Versions

...

@MarkBekooy MarkBekooy added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Feb 4, 2024
@twoertwein twoertwein added good first issue Typing type annotations, mypy/pyright type checking and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Feb 4, 2024
@rhshadrach
Copy link
Member

Since it's valid Python, it sounds like this should also be reported to libcst.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug good first issue Typing type annotations, mypy/pyright type checking
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants