Skip to content

fix: incorrect type in misc/test_case_to_actual.py:produce_chunks test case #13452

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
Aug 19, 2022

Conversation

kkirsche
Copy link
Contributor

Description

This pull request updates the produce_chunks method which included an incorrectly annotated type. By updating this test, the intent is to provide greater type safety of the produce_chunks method. Technically, the use of Iterator could also be changed to a Generator, but this was not a true "error", but rather dependent on intent as I understood it.

Test Plan

N/A

@kkirsche kkirsche changed the title fix: incorrect type in produce_chunks test case fix: incorrect type in misc/test_case_to_actual.py:produce_chunks test case Aug 19, 2022
Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

You can use PEP 604 syntax, since we have from __future__ import annotations at the top of the file

@kkirsche
Copy link
Contributor Author

You can use PEP 604 syntax, since we have from __future__ import annotations at the top of the file

Oh, cool. I didn't know that included that aspect, I've only used it before to enable forward references. I'll update that as soon as possible.

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

Thanks for spotting!

@hauntsaninja hauntsaninja merged commit 4a7d0c8 into python:master Aug 19, 2022
@kkirsche kkirsche deleted the fix/incorrect-type-in-test-case branch August 19, 2022 18:22
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.

3 participants