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

ApplyTypeAnnotations: apply parameter annotations even if no return type is declared #445

Merged
merged 1 commit into from
Jan 7, 2021

Conversation

MaggieMoss
Copy link
Contributor

@MaggieMoss MaggieMoss commented Jan 7, 2021

Summary

Caught this bug while running codemods, the result was that stubs for functions with parameter annotations, but without return annotations would not be annotated.

Test Plan

python -m unittest -v libcst.codemod.visitors.tests.test_apply_type_annotations

cc: @jimmylai

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 7, 2021
@zsol zsol self-assigned this Jan 7, 2021
Copy link
Member

@zsol zsol left a comment

Choose a reason for hiding this comment

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

Looks straightforward, thanks!

@zsol zsol changed the title Fix bug in apply annotations, add test. ApplyTypeAnnotations: apply parameter annotations even if no return type is declared Jan 7, 2021
@zsol zsol merged commit c22ed6a into Instagram:master Jan 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants