Skip to content

Commit 62c1d9a

Browse files
committed
refactor
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent e10ffee commit 62c1d9a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

cyclonedx/serialization/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"""
1818
Set of helper classes for use with ``serializable`` when conducting (de-)serialization.
1919
"""
20-
import json
2120
from json import loads as json_loads
2221
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Type
2322
from uuid import UUID
@@ -104,7 +103,7 @@ def json_normalize(cls, o: LicenseRepository, *,
104103
# mixed license expression and license? this is an invalid constellation according to schema!
105104
# see https://github.com/CycloneDX/specification/pull/205
106105
# but models need to allow it for backwards compatibility with JSON CDX < 1.5
107-
return [json.loads(expression.as_json(view_=view))] # type:ignore[attr-defined]
106+
return [json_loads(expression.as_json(view_=view))] # type:ignore[attr-defined]
108107
return [
109108
{'license': json_loads(
110109
li.as_json( # type:ignore[attr-defined]

0 commit comments

Comments
 (0)