formatting
This commit is contained in:
parent
ea2c8ca985
commit
09827dc0cb
1 changed files with 3 additions and 1 deletions
|
|
@ -77,7 +77,9 @@ def build_json(root, graph) -> Dict:
|
|||
raise ValueError(f"No child with type {node_type} found")
|
||||
values = [build_json(child, graph) for child in children]
|
||||
value = (
|
||||
list(values) if value["list"] else next(iter(values), None) # type: ignore
|
||||
list(values)
|
||||
if value["list"]
|
||||
else next(iter(values), None) # type: ignore
|
||||
)
|
||||
final_dict[key] = value
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue