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 indentation of python templates with ignore_empty fields inside oneof #613

Merged
merged 1 commit into from Aug 11, 2022

Conversation

fishcakez
Copy link
Contributor

@fishcakez fishcakez commented Jul 12, 2022

When ignore_empty used by a field inside a oneof then the generated python code was invalid. This is fixed by removal of the whitespace removal in the template to ensure if clause goes onto newline with base indentation.

Signed-off-by: James Fish jfish@pinterest.com

Signed-off-by: James Fish <jfish@pinterest.com>
Copy link
Member

@rodaine rodaine 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 the patch!

@rodaine rodaine merged commit 61feee2 into bufbuild:main Aug 11, 2022
eleduardo pushed a commit to eleduardo/protoc-gen-validate that referenced this pull request Aug 29, 2022
Signed-off-by: James Fish <jfish@pinterest.com>

Signed-off-by: James Fish <jfish@pinterest.com>
Signed-off-by: Eduardo Solis <eduardo.solis@mica.io>
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.

None yet

2 participants