Skip to content

Commit 8cff89e

Browse files
committed
review feedback
Signed-off-by: Johannes Feichtner <[email protected]>
1 parent 2f01d08 commit 8cff89e

16 files changed

+483
-5
lines changed

cyclonedx/model/bom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def lifecycles(self) -> LifecycleRepository:
125125
return self._lifecycles
126126

127127
@lifecycles.setter
128-
def lifecycles(self, lifecycles: Iterable[Lifecycle]) -> None:
128+
def lifecycles(self, lifecycles: Optional[Iterable[Lifecycle]]) -> None:
129129
self._lifecycles = LifecycleRepository(lifecycles)
130130

131131
@property

cyclonedx/model/lifecycle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def __repr__(self) -> str:
9393

9494
@serializable.serializable_class
9595
class CustomPhase:
96-
def __init__(self, name: str, description: Optional[str] = None) -> None:
96+
def __init__(self, name: str, *, description: Optional[str] = None) -> None:
9797
self._name = name
9898
self._description = description
9999

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" ?>
2+
<bom xmlns="http://cyclonedx.org/schema/bom/1.0" version="1">
3+
<components/>
4+
</bom>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" ?>
2+
<bom xmlns="http://cyclonedx.org/schema/bom/1.1" serialNumber="urn:uuid:1441d33a-e0fc-45b5-af3b-61ee52a88bac" version="1">
3+
<components/>
4+
</bom>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"metadata": {
3+
"timestamp": "2023-01-07T13:44:32.312678+00:00",
4+
"tools": [
5+
{
6+
"name": "cyclonedx-python-lib",
7+
"vendor": "CycloneDX",
8+
"version": "TESTING"
9+
}
10+
]
11+
},
12+
"serialNumber": "urn:uuid:1441d33a-e0fc-45b5-af3b-61ee52a88bac",
13+
"version": 1,
14+
"$schema": "http://cyclonedx.org/schema/bom-1.2b.schema.json",
15+
"bomFormat": "CycloneDX",
16+
"specVersion": "1.2"
17+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" ?>
2+
<bom xmlns="http://cyclonedx.org/schema/bom/1.2" serialNumber="urn:uuid:1441d33a-e0fc-45b5-af3b-61ee52a88bac" version="1">
3+
<metadata>
4+
<timestamp>2023-01-07T13:44:32.312678+00:00</timestamp>
5+
<tools>
6+
<tool>
7+
<vendor>CycloneDX</vendor>
8+
<name>cyclonedx-python-lib</name>
9+
<version>TESTING</version>
10+
</tool>
11+
</tools>
12+
</metadata>
13+
</bom>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"metadata": {
3+
"timestamp": "2023-01-07T13:44:32.312678+00:00",
4+
"tools": [
5+
{
6+
"name": "cyclonedx-python-lib",
7+
"vendor": "CycloneDX",
8+
"version": "TESTING"
9+
}
10+
]
11+
},
12+
"serialNumber": "urn:uuid:1441d33a-e0fc-45b5-af3b-61ee52a88bac",
13+
"version": 1,
14+
"$schema": "http://cyclonedx.org/schema/bom-1.3a.schema.json",
15+
"bomFormat": "CycloneDX",
16+
"specVersion": "1.3"
17+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" ?>
2+
<bom xmlns="http://cyclonedx.org/schema/bom/1.3" serialNumber="urn:uuid:1441d33a-e0fc-45b5-af3b-61ee52a88bac" version="1">
3+
<metadata>
4+
<timestamp>2023-01-07T13:44:32.312678+00:00</timestamp>
5+
<tools>
6+
<tool>
7+
<vendor>CycloneDX</vendor>
8+
<name>cyclonedx-python-lib</name>
9+
<version>TESTING</version>
10+
</tool>
11+
</tools>
12+
</metadata>
13+
</bom>
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"metadata": {
3+
"timestamp": "2023-01-07T13:44:32.312678+00:00",
4+
"tools": [
5+
{
6+
"externalReferences": [
7+
{
8+
"type": "build-system",
9+
"url": "https://github.com/CycloneDX/cyclonedx-python-lib/actions"
10+
},
11+
{
12+
"type": "distribution",
13+
"url": "https://pypi.org/project/cyclonedx-python-lib/"
14+
},
15+
{
16+
"type": "documentation",
17+
"url": "https://cyclonedx-python-library.readthedocs.io/"
18+
},
19+
{
20+
"type": "issue-tracker",
21+
"url": "https://github.com/CycloneDX/cyclonedx-python-lib/issues"
22+
},
23+
{
24+
"type": "license",
25+
"url": "https://github.com/CycloneDX/cyclonedx-python-lib/blob/main/LICENSE"
26+
},
27+
{
28+
"type": "release-notes",
29+
"url": "https://github.com/CycloneDX/cyclonedx-python-lib/blob/main/CHANGELOG.md"
30+
},
31+
{
32+
"type": "vcs",
33+
"url": "https://github.com/CycloneDX/cyclonedx-python-lib"
34+
},
35+
{
36+
"type": "website",
37+
"url": "https://github.com/CycloneDX/cyclonedx-python-lib/#readme"
38+
}
39+
],
40+
"name": "cyclonedx-python-lib",
41+
"vendor": "CycloneDX",
42+
"version": "TESTING"
43+
}
44+
]
45+
},
46+
"serialNumber": "urn:uuid:1441d33a-e0fc-45b5-af3b-61ee52a88bac",
47+
"version": 1,
48+
"$schema": "http://cyclonedx.org/schema/bom-1.4.schema.json",
49+
"bomFormat": "CycloneDX",
50+
"specVersion": "1.4"
51+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?xml version="1.0" ?>
2+
<bom xmlns="http://cyclonedx.org/schema/bom/1.4" serialNumber="urn:uuid:1441d33a-e0fc-45b5-af3b-61ee52a88bac" version="1">
3+
<metadata>
4+
<timestamp>2023-01-07T13:44:32.312678+00:00</timestamp>
5+
<tools>
6+
<tool>
7+
<vendor>CycloneDX</vendor>
8+
<name>cyclonedx-python-lib</name>
9+
<version>TESTING</version>
10+
<externalReferences>
11+
<reference type="build-system">
12+
<url>https://github.com/CycloneDX/cyclonedx-python-lib/actions</url>
13+
</reference>
14+
<reference type="distribution">
15+
<url>https://pypi.org/project/cyclonedx-python-lib/</url>
16+
</reference>
17+
<reference type="documentation">
18+
<url>https://cyclonedx-python-library.readthedocs.io/</url>
19+
</reference>
20+
<reference type="issue-tracker">
21+
<url>https://github.com/CycloneDX/cyclonedx-python-lib/issues</url>
22+
</reference>
23+
<reference type="license">
24+
<url>https://github.com/CycloneDX/cyclonedx-python-lib/blob/main/LICENSE</url>
25+
</reference>
26+
<reference type="release-notes">
27+
<url>https://github.com/CycloneDX/cyclonedx-python-lib/blob/main/CHANGELOG.md</url>
28+
</reference>
29+
<reference type="vcs">
30+
<url>https://github.com/CycloneDX/cyclonedx-python-lib</url>
31+
</reference>
32+
<reference type="website">
33+
<url>https://github.com/CycloneDX/cyclonedx-python-lib/#readme</url>
34+
</reference>
35+
</externalReferences>
36+
</tool>
37+
</tools>
38+
</metadata>
39+
</bom>

0 commit comments

Comments
 (0)