Skip to content

Commit 96fe96c

Browse files
committed
style
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 1a48106 commit 96fe96c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

cyclonedx/model/tool.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -281,12 +281,12 @@ def json_normalize(cls, o: ToolsRepository, *,
281281
**__: Any) -> Any:
282282
if not o:
283283
return None
284-
return cls.__all_as_tools(o) \
285-
if len(o.tools) > 0 or not cls.__supports_components_and_services(view) \
286-
else {
287-
'components': tuple(o.components) if len(o.components) > 0 else None,
288-
'services': tuple(o.services) if len(o.services) > 0 else None,
289-
}
284+
if len(o.tools) > 0 or not cls.__supports_components_and_services(view):
285+
return cls.__all_as_tools(o)
286+
return {
287+
'components': tuple(o.components) if len(o.components) > 0 else None,
288+
'services': tuple(o.services) if len(o.services) > 0 else None,
289+
}
290290

291291
@classmethod
292292
def json_denormalize(cls, o: Union[List[Dict[str, Any]], Dict[str, Any]],

0 commit comments

Comments
 (0)