Skip to content
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

fix: add 'dict' type annotation to 'request' #966

Merged
merged 2 commits into from Aug 4, 2021

Conversation

busunkim96
Copy link
Contributor

@busunkim96 busunkim96 commented Aug 3, 2021

The generated libraries have always accepted both a generated type or an equivalent dict. This PR updates the type hints/docstrings to include dict.

It looks like TypedDict could be useful too, but we won't be able to use it until 3.8 is the lowest supported python version.

@busunkim96 busunkim96 requested a review from a team as a code owner August 3, 2021 22:20
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Aug 3, 2021
@busunkim96 busunkim96 changed the title fix: add 'dict' type annotation to request fix: add 'dict' type annotation to request type annotation Aug 3, 2021
@busunkim96 busunkim96 changed the title fix: add 'dict' type annotation to request type annotation fix: add 'dict' type annotation to 'request' Aug 3, 2021
@busunkim96 busunkim96 merged commit 49205d9 into master Aug 4, 2021
@busunkim96 busunkim96 deleted the add-dict-type-to-requests branch August 4, 2021 16:05
@henribru
Copy link
Contributor

It looks like TypedDict could be useful too, but we won't be able to use it until 3.8 is the lowest supported python version.

Worth noting that you can use it perfectly fine in earlier versions using https://github.com/python/typing/tree/master/typing_extensions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants