Skip to content

Commit

Permalink
address review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
parthea committed May 29, 2024
1 parent d56db4b commit 4e9f90e
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions proto/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,16 +447,15 @@ def _normalize_print_fields_without_presense(
cls._raise_if_print_fields_values_are_set_and_differ(
always_print_fields_with_no_presence, including_default_value_fields
)
if (
always_print_fields_with_no_presence is None
and including_default_value_fields is None
):
print_fields = True
else:
print_fields = (
always_print_fields_with_no_presence or including_default_value_fields
# Default to True if neither `always_print_fields_with_no_presence` or `including_default_value_fields` is set
return (
(
always_print_fields_with_no_presence is None
and including_default_value_fields is None
)
return print_fields
or always_print_fields_with_no_presence
or including_default_value_fields
)

def to_json(
cls,
Expand Down

0 comments on commit 4e9f90e

Please sign in to comment.