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

chore(rosetta): change how python shows declared types and include module name #3317

Merged
merged 3 commits into from
Jan 5, 2022

Conversation

kaizencc
Copy link
Contributor

@kaizencc kaizencc commented Jan 4, 2022

Currently, Python type declarations are rendered as such:

# get_book_handler is of type Function
# get_book_integration is of type LambdaIntegration


get_book_integration = apigateway.LambdaIntegration(get_book_handler,
    content_handling=apigateway.ContentHandling.CONVERT_TO_TEXT,  # convert to base64
    credentials_passthrough=True
)

This PR adds information on what module the type came from (if possible), and changes the way these type declarations are shown:

# get_book_handler: lambda.Function
# get_book_integration: apigateway.LambdaIntegration


get_book_integration = apigateway.LambdaIntegration(get_book_handler,
    content_handling=apigateway.ContentHandling.CONVERT_TO_TEXT,  # convert to base64
    credentials_passthrough=True
)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@kaizencc kaizencc requested a review from rix0rrr January 4, 2022 22:09
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jan 4, 2022
@rix0rrr rix0rrr added the pr/do-not-merge This PR should not be merged at this time. label Jan 5, 2022
@kaizencc kaizencc changed the title chore(rosetta): python declaration translated with module name chore(rosetta): change how python shows declared types and include module name Jan 5, 2022
@kaizencc kaizencc removed the pr/do-not-merge This PR should not be merged at this time. label Jan 5, 2022
@mergify
Copy link
Contributor

mergify bot commented Jan 5, 2022

Thank you for contributing! ❤️ I will now look into making sure the PR is up-to-date, then proceed to try and merge it!

@mergify mergify bot added the pr/ready-to-merge This PR is ready to be merged. label Jan 5, 2022
@mergify mergify bot merged commit d34881c into main Jan 5, 2022
@mergify mergify bot deleted the conroy/python-declare branch January 5, 2022 16:16
@mergify
Copy link
Contributor

mergify bot commented Jan 5, 2022

Merging (with squash)...

@mergify mergify bot removed the pr/ready-to-merge This PR is ready to be merged. label Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants