Skip to content

csv: annotate keyword arguments in various functions and methods #7788

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
May 8, 2022

Conversation

AlexWaygood
Copy link
Member

@AlexWaygood AlexWaygood commented May 6, 2022

_csv.reader, _csv.writer, _csv.register_dialect, csv.DictReader.__init__, csv.DictWriter.__init__: none of these take arbitrary keyword arguments like the stub currently says. Instead, they all take keyword arguments corresponding to the fieldnames on _csv.Dialect.

@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@AlexWaygood

This comment was marked as outdated.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@AlexWaygood AlexWaygood closed this May 6, 2022
@AlexWaygood AlexWaygood reopened this May 7, 2022
@AlexWaygood AlexWaygood changed the title Improve csv module stubs csv: annotate **kwargs in various methods May 7, 2022
@AlexWaygood AlexWaygood changed the title csv: annotate **kwargs in various methods csv: annotate keyword arguments in various methods May 7, 2022
@AlexWaygood AlexWaygood marked this pull request as ready for review May 7, 2022 11:31
@AlexWaygood AlexWaygood changed the title csv: annotate keyword arguments in various methods csv: annotate keyword arguments in various functions and methods May 7, 2022
@github-actions
Copy link
Contributor

github-actions bot commented May 7, 2022

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

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

This is correct, but while reviewing I noticed that our stubs for Dialect are wrong. I'll try to address that separately.

@JelleZijlstra JelleZijlstra merged commit 3ed7e3b into python:master May 8, 2022
@AlexWaygood AlexWaygood deleted the csv1 branch May 8, 2022 05:06
@AlexWaygood
Copy link
Member Author

AlexWaygood commented May 8, 2022

This is correct, but while reviewing I noticed that our stubs for Dialect are wrong. I'll try to address that separately.

It doesn't seem like our csv stubs have had much TLC in a while :)

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