Skip to content

ENH: Move warnings to error/__init__.py per GH27656 #47901

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 9 commits into from
Aug 8, 2022

Conversation

dataxerik
Copy link
Contributor

I noticed one of the strings didn't have a Final so I've added it.

Besides the tslibs and OptionError errors, I think I've moved all the exceptions/warnings to the __errors.py. Is there anything else I should do?

@mroeschke
Copy link
Member

In a follow up PR, you could maybe add a pre-commit hook to validate that errors are only defined in pandas/_libs or pandas/errors/__init__.py to close out the issue

@mroeschke mroeschke added Enhancement Error Reporting Incorrect or improved errors from pandas labels Jul 29, 2022
@dataxerik
Copy link
Contributor Author

In a follow up PR, you could maybe add a pre-commit hook to validate that errors are only defined in pandas/_libs or pandas/errors/__init__.py to close out the issue

Gotcha, I'll work on that next

@mroeschke mroeschke added this to the 1.5 milestone Aug 8, 2022
@mroeschke mroeschke merged commit 9e8387c into pandas-dev:main Aug 8, 2022
@mroeschke
Copy link
Member

Thanks again @dataxerik!

noatamir pushed a commit to noatamir/pandas that referenced this pull request Nov 9, 2022
* ENH: Move warnings to error/__init__.py per GH27656

* ENH: update whatsnew line

* ENH: add and re-add final

* ENH: add to __all__

* ENH: apply feedback

* ENH: fix doc string

* ENH: add additional exception/warnings to rst

* ENH: fix rst and typo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Error Reporting Incorrect or improved errors from pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants