Skip to content

Delete undocumented functions #1254

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 8 commits into from
Jun 20, 2025
Merged

Delete undocumented functions #1254

merged 8 commits into from
Jun 20, 2025

Conversation

yangdanny97
Copy link
Contributor

Found using a script as described in #1253

I did not delete anything in _testing, since I assumed they are test helpers.

Deletion performed automatically using a libCST codemod script: https://gist.github.com/yangdanny97/5d07f14527ac46035208a8119f3cfca2

@yangdanny97 yangdanny97 marked this pull request as draft June 17, 2025 15:13
@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Jun 17, 2025

You're getting some errors. I'm OK if you remove the is_array_like() tests because that's not documented, so we shouldn't have tests for it.

Copy link
Collaborator

@Dr-Irv Dr-Irv left a comment

Choose a reason for hiding this comment

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

Thanks for doing this. I found other things you can delete.

For some of the files, there are just whitespace changes - not sure why. E.g., pandas-stubs/io/sas/sasreader.pyi . Not sure why that is happening.

@yangdanny97
Copy link
Contributor Author

yangdanny97 commented Jun 17, 2025

Thanks for the review! I'll clean things up later today or tomorrow

Not sure why there were a bunch of whitespace changes, I thought libCST was supposed to be whitespace-preserving.

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Jun 18, 2025

CI is showing that deleting pandas-stubs/core/computation/scope.pyi caused issues. You can put it back, and remove ensure_scope() from there. I do think, with some work, some of the things in pandas-stubs/core/computation/pytables.pyi can be removed, but then pandas/io/pytables.pyi has a dependency there so it's a bit painful to untangle.

@yangdanny97
Copy link
Contributor Author

Maybe we save the trickier part for a separate PR, since this one is already kind of large.

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Jun 19, 2025

Well now mypy is happy, but pyright is not. See the CI logs and fix the corresponding issues.

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Jun 19, 2025

So I think this is good to go. Feel free to take it out of Draft status and ping for final approve/merge

@yangdanny97 yangdanny97 marked this pull request as ready for review June 20, 2025 00:06
@yangdanny97
Copy link
Contributor Author

Cool, ready to go.

Copy link
Collaborator

@Dr-Irv Dr-Irv left a comment

Choose a reason for hiding this comment

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

Thanks @yangdanny97

@Dr-Irv Dr-Irv merged commit fdda5a6 into pandas-dev:main Jun 20, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants