-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Added - Support for the `google.protobuf.Value` message
- Loading branch information
1 parent
374d8fe
commit 373f620
Showing
2 changed files
with
1 addition
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,8 +36,6 @@ def dataclass_to_dict(dc) -> Dict: | |
d = {} | ||
for field in dataclasses.fields(dc): | ||
dicted = _dataclass_field_to_dict_field(field, dc) | ||
# if dicted: | ||
# if dicted is not None: # TODO([email protected]>) 2024-04-15: To include "default/empty" fields or not? | ||
if dicted is not ...: | ||
d[_get_proto_field_name(field)] = dicted | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -305,7 +305,7 @@ def test_dataclass_to_dict(self): | |
'simple_map': {'dora': 'Imamap!', | ||
'diego': 'Camera!'}, | ||
'message_map': {'mickey': {'foo': 'mouse', | ||
'bar': ''}, # TODO([email protected]>) 2024-04-15: Should we include "default/empty" values?!? | ||
'bar': ''}, | ||
'donald': {'foo': 'duck', | ||
'bar': 'trump'}}} | ||
|
||
|