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

feat(Python): Format docstrings #586

Merged
merged 2 commits into from
Sep 17, 2024
Merged

feat(Python): Format docstrings #586

merged 2 commits into from
Sep 17, 2024

Conversation

lucasmcdonald3
Copy link
Contributor

@lucasmcdonald3 lucasmcdonald3 commented Sep 16, 2024

Issue #, if available:

Description of changes:

Format docstrings.

See https://aws-cryptographic-material-providers-library.readthedocs.io/en/latest/generated/aws_cryptographic_materialproviders.smithygenerated.aws_cryptography_keystore.models.html for an example.
Before, the parameters and function descriptions were not displaying correctly because the docstrings weren't formatted.
Now, they are appearing correctly.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@lucasmcdonald3 lucasmcdonald3 marked this pull request as ready for review September 16, 2024 21:10
@lucasmcdonald3 lucasmcdonald3 requested a review from a team as a code owner September 16, 2024 21:10
@@ -374,13 +374,6 @@ protected void writeFromDict(boolean isError) {
() -> {
writer.writeDocs(() -> {
writer.write("Creates a $L from a dictionary.\n", shapeName);
writer.write(
Copy link
Contributor

Choose a reason for hiding this comment

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

This is unrelated removal of comments that weren't supposed to be user-facing in the first place?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This comment is inaccurate for Python codegen (and is inaccurate for Smithy-Python codegen).

  • Formatting according to docstring note: SomeMemberName
    • This is the "boto3" formatting.
  • Actual Smithy-Python formatting: someMemberName
  • Smithy-Dafny Python formatting: some_member_name

@robin-aws robin-aws merged commit dcc45dc into main-1.x Sep 17, 2024
80 checks passed
@lucasmcdonald3 lucasmcdonald3 deleted the python-format-docs branch September 17, 2024 21:53
ShubhamChaturvedi7 pushed a commit that referenced this pull request Oct 18, 2024
Format docstrings.

See https://aws-cryptographic-material-providers-library.readthedocs.io/en/latest/generated/aws_cryptographic_materialproviders.smithygenerated.aws_cryptography_keystore.models.html for an example.
Before, the parameters and function descriptions were not displaying correctly because the docstrings weren't formatted.
Now, they are appearing correctly.
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