Skip to content

gh-137986: Fix csv.register_dialect docstring #137949

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

Conversation

maurycy
Copy link
Contributor

@maurycy maurycy commented Aug 19, 2025

The current docstring:

is incorrect, since the function does not return the dialect:

This is a public method:

I'm not sure if it warrants a NEWS.d entry.

@serhiy-storchaka
Copy link
Member

Thank you for your PR @maurycy. You are absolutely right, the current docstring is incorrect.

But adding signature at the end of the docstring is not common. And other functions in the csv module has such issue. This is a larger problem, so I opened #137986 for it.

serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Aug 20, 2025
The csv.register_dialect() docstring no longer imply that it returns a
dialect.
All functions have now signatures.
@picnixz picnixz changed the title Fix csv.register_dialect docstring gh-137986: Fix csv.register_dialect docstring Aug 20, 2025
@picnixz
Copy link
Member

picnixz commented Aug 20, 2025

I'm going to put it under gh-137986, we'll decide whether we want this change merged separately or not.

@picnixz
Copy link
Member

picnixz commented Aug 20, 2025

Actually, this change is superseded by #137987 so I'm closing this one.

@picnixz picnixz closed this Aug 20, 2025
@maurycy maurycy deleted the csv-register-dialect-docstring-inaccurancy branch August 20, 2025 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants