Skip to content

Commit 59bd0f3

Browse files
committed
More code clenaup
1 parent 7f711f6 commit 59bd0f3

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

cyclonedx/model/bom.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
from .._internal.time import get_now_utc as _get_now_utc
2929
from ..exception.model import (
3030
LicenseExpressionAlongWithOthersException,
31-
MutuallyExclusivePropertiesException,
3231
UnknownComponentDependencyException,
3332
)
3433
from ..model.tool import Tool, ToolsRepository, ToolsRepositoryHelper

cyclonedx/model/tool.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
from ..schema.schema import SchemaVersion1Dot4, SchemaVersion1Dot5, SchemaVersion1Dot6
1818

1919

20-
2120
@serializable.serializable_class
2221
class Tool:
2322
"""
@@ -152,16 +151,6 @@ class ToolsRepository:
152151
tools. Otherwise, it will behave like an object with `components`
153152
and `services` attributes (which are SortedSets of their respective types).
154153
"""
155-
156-
tools: SortedSet[Tool]
157-
"""DEPRECATED tools"""
158-
159-
components: SortedSet[Component]
160-
"""An array of components used to creatd this SBOM"""
161-
162-
services: SortedSet[Service]
163-
"""An array of services used to create this SBOM"""
164-
165154
def __init__(self, *, components: Optional[Iterable[Component]] = None,
166155
services: Optional[Iterable[Service]] = None,
167156
# Deprecated in v1.5
@@ -257,7 +246,8 @@ def json_normalize(cls, o: ToolsRepository, *,
257246
result = {}
258247

259248
if o.components:
260-
result['components'] = [json_loads(Component.as_json(c)) for c in o.components] # type: ignore[attr-defined]
249+
result['components'] = [json_loads(Component.as_json(c))
250+
for c in o.components] # type: ignore[attr-defined]
261251

262252
if o.services:
263253
result['services'] = [json_loads(Service.as_json(s)) for s in o.services] # type: ignore[attr-defined]

0 commit comments

Comments
 (0)