Skip to content

Validate docstring error code #57767

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 3 commits into from
Mar 7, 2024

Conversation

tqa236
Copy link
Contributor

@tqa236 tqa236 commented Mar 7, 2024

This PR does 2 things

  • Validate that all pandas error codes are not overlapped with numpydoc's
  • Validate that all input error codes are valid

I wonder if this is a welcome change? Currently, I can detect 1 duplicated error code.

@tqa236 tqa236 requested a review from mroeschke as a code owner March 7, 2024 19:05
@tqa236 tqa236 force-pushed the validate-docstring-error-codes branch from ef59fd5 to 24d3592 Compare March 7, 2024 19:11
@@ -56,7 +57,7 @@
ERROR_MSGS = {
"GL04": "Private classes ({mentioned_private_classes}) should not be "
"mentioned in public docstrings",
"GL05": "Use 'array-like' rather than 'array_like' in docstrings.",
"GL11": "Use 'array-like' rather than 'array_like' in docstrings.",
Copy link
Member

Choose a reason for hiding this comment

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

Could we rename this to a whole differnt prefix? like PD01?

Copy link
Member

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

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

Nice, I think this is a good idea. Just one comment

@mroeschke mroeschke added the Docs label Mar 7, 2024
@mroeschke mroeschke added this to the 3.0 milestone Mar 7, 2024
@mroeschke mroeschke merged commit 2d4305c into pandas-dev:main Mar 7, 2024
@mroeschke
Copy link
Member

Thanks @tqa236

@tqa236 tqa236 deleted the validate-docstring-error-codes branch March 7, 2024 21:32
@tqa236 tqa236 mentioned this pull request Mar 7, 2024
pmhatre1 pushed a commit to pmhatre1/pandas-pmhatre1 that referenced this pull request May 7, 2024
* Validate docstring error code

* Rename error code

* Fix tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants