Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/buildstream/_frontend/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ def show_pipeline(self, dependencies, format_):

serialized_sources = []
for s in source_infos:
serialized = s._serialize()
serialized = s.serialize()
serialized_sources.append(serialized)

all_source_infos += serialized_sources
Expand Down
14 changes: 6 additions & 8 deletions src/buildstream/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,14 +587,12 @@ def __init__(
Additional plugin defined key/values
"""

# _serialize()
#
# Produce a dictionary object suitable to be dumped in YAML format
# in the `bst show` command line interface.
#
# Returns: A dictionary used to dump this out on the CLI with _yaml.roundtrip_dump_string()
#
def _serialize(self) -> Dict[str, Any]:
def serialize(self) -> Dict[str, Union[str, Dict[str, str]]]:
"""Produce a dictionary object suitable for serialization into formats like json or yaml.

Returns: A dictionary object with strings as keys and values, except for the
extra_data which, if present, is also a dictionary with strings as keys and values.
"""
#
# WARNING: This return value produces output for an API stable interface.
#
Expand Down
Loading