Skip to content

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

Merged
JelleZijlstra merged 9 commits into
python:masterfrom
AlexWaygood:csv1
May 8, 2022
Merged

JelleZijlstra merged 9 commits into
python:masterfrom
AlexWaygood:csv1

Conversation

@AlexWaygood

@AlexWaygood AlexWaygood commented May 6, 2022 •

Copy link
Copy Markdown
Member

_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.

Comment thread stdlib/csv.pyi Outdated
@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.

Comment thread stdlib/csv.pyi Outdated
@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

github-actions Bot commented May 7, 2022

Copy link
Copy Markdown
Contributor

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

@JelleZijlstra JelleZijlstra left a comment

Copy link
Copy Markdown
Member

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

AlexWaygood commented May 8, 2022 •

Copy link
Copy Markdown
Member Author

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