Skip to content

Commit fb9a42e

Browse files
authored
docs: modernize docstrings for CDX1.6 (#759)
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 8c14a87 commit fb9a42e

File tree

13 files changed

+59
-59
lines changed

13 files changed

+59
-59
lines changed

cyclonedx/model/__init__.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class DataFlow(str, Enum):
6464
This is our internal representation of the dataFlowType simple type within the CycloneDX standard.
6565
6666
.. note::
67-
See the CycloneDX Schema: https://cyclonedx.org/docs/1.4/xml/#type_dataFlowType
67+
See the CycloneDX Schema: https://cyclonedx.org/docs/1.6/xml/#type_dataFlowType
6868
"""
6969
INBOUND = 'inbound'
7070
OUTBOUND = 'outbound'
@@ -82,7 +82,7 @@ class DataClassification:
8282
8383
.. note::
8484
See the CycloneDX Schema for dataClassificationType:
85-
https://cyclonedx.org/docs/1.4/xml/#type_dataClassificationType
85+
https://cyclonedx.org/docs/1.6/xml/#type_dataClassificationType
8686
"""
8787

8888
def __init__(
@@ -160,7 +160,7 @@ class Encoding(str, Enum):
160160
This is our internal representation of the encoding simple type within the CycloneDX standard.
161161
162162
.. note::
163-
See the CycloneDX Schema: https://cyclonedx.org/docs/1.4/#type_encoding
163+
See the CycloneDX Schema: https://cyclonedx.org/docs/1.6/#type_encoding
164164
"""
165165
BASE_64 = 'base64'
166166

@@ -171,7 +171,7 @@ class AttachedText:
171171
This is our internal representation of the `attachedTextType` complex type within the CycloneDX standard.
172172
173173
.. note::
174-
See the CycloneDX Schema for hashType: https://cyclonedx.org/docs/1.3/#type_attachedTextType
174+
See the CycloneDX Schema for hashType: https://cyclonedx.org/docs/1.6/#type_attachedTextType
175175
"""
176176

177177
DEFAULT_CONTENT_TYPE = 'text/plain'
@@ -263,7 +263,7 @@ class HashAlgorithm(str, Enum):
263263
This is our internal representation of the hashAlg simple type within the CycloneDX standard.
264264
265265
.. note::
266-
See the CycloneDX Schema: https://cyclonedx.org/docs/1.3/#type_hashAlg
266+
See the CycloneDX Schema: https://cyclonedx.org/docs/1.6/#type_hashAlg
267267
"""
268268
# see `_HashTypeRepositorySerializationHelper.__CASES` for view/case map
269269
BLAKE2B_256 = 'BLAKE2b-256' # Only supported in >= 1.2
@@ -386,7 +386,7 @@ class HashType:
386386
This is our internal representation of the hashType complex type within the CycloneDX standard.
387387
388388
.. note::
389-
See the CycloneDX Schema for hashType: https://cyclonedx.org/docs/1.3/#type_hashType
389+
See the CycloneDX Schema for hashType: https://cyclonedx.org/docs/1.6/#type_hashType
390390
"""
391391

392392
@staticmethod
@@ -542,7 +542,7 @@ class ExternalReferenceType(str, Enum):
542542
Enum object that defines the permissible 'types' for an External Reference according to the CycloneDX schema.
543543
544544
.. note::
545-
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.3/#type_externalReferenceType
545+
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.6/#type_externalReferenceType
546546
"""
547547
# see `_ExternalReferenceSerializationHelper.__CASES` for view/case map
548548
ADVERSARY_MODEL = 'adversary-model' # Only supported in >= 1.5
@@ -810,7 +810,7 @@ class ExternalReference:
810810
a CycloneDX BOM document.
811811
812812
.. note::
813-
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.3/#type_externalReference
813+
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.6/#type_externalReference
814814
"""
815815

816816
def __init__(
@@ -923,7 +923,7 @@ class Property:
923923
a CycloneDX BOM document.
924924
925925
.. note::
926-
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.4/xml/#type_propertyType
926+
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.6/xml/#type_propertyType
927927
928928
Specifies an individual property with a name and value.
929929
"""
@@ -997,7 +997,7 @@ class NoteText:
997997
a CycloneDX BOM document.
998998
999999
.. note::
1000-
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.4/xml/#type_releaseNotesType
1000+
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.6/xml/#type_releaseNotesType
10011001
"""
10021002

10031003
DEFAULT_CONTENT_TYPE: str = 'text/plain'
@@ -1088,7 +1088,7 @@ class Note:
10881088
a CycloneDX BOM document.
10891089
10901090
.. note::
1091-
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.4/xml/#type_releaseNotesType
1091+
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.6/xml/#type_releaseNotesType
10921092
10931093
@todo: Replace ``NoteText`` with ``AttachedText``?
10941094
"""
@@ -1171,7 +1171,7 @@ class IdentifiableAction:
11711171
This is our internal representation of the `identifiableActionType` complex type.
11721172
11731173
.. note::
1174-
See the CycloneDX specification: https://cyclonedx.org/docs/1.4/xml/#type_identifiableActionType
1174+
See the CycloneDX specification: https://cyclonedx.org/docs/1.6/xml/#type_identifiableActionType
11751175
"""
11761176

11771177
def __init__(
@@ -1261,7 +1261,7 @@ class Copyright:
12611261
This is our internal representation of the `copyrightsType` complex type.
12621262
12631263
.. note::
1264-
See the CycloneDX specification: https://cyclonedx.org/docs/1.4/xml/#type_copyrightsType
1264+
See the CycloneDX specification: https://cyclonedx.org/docs/1.6/xml/#type_copyrightsType
12651265
"""
12661266

12671267
def __init__(

cyclonedx/model/bom.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class BomMetaData:
5959
This is our internal representation of the metadata complex type within the CycloneDX standard.
6060
6161
.. note::
62-
See the CycloneDX Schema for Bom metadata: https://cyclonedx.org/docs/1.5/#type_metadata
62+
See the CycloneDX Schema for Bom metadata: https://cyclonedx.org/docs/1.6/#type_metadata
6363
"""
6464

6565
def __init__(
@@ -394,7 +394,7 @@ def metadata(self) -> BomMetaData:
394394
Metadata object instance for this Bom.
395395
396396
.. note::
397-
See the CycloneDX Schema for Bom metadata: https://cyclonedx.org/docs/1.3/#type_metadata
397+
See the CycloneDX Schema for Bom metadata: https://cyclonedx.org/docs/1.6/#type_metadata
398398
"""
399399
return self._metadata
400400

cyclonedx/model/component.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class Commit:
7171
Our internal representation of the `commitType` complex type.
7272
7373
.. note::
74-
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.4/xml/#type_commitType
74+
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.6/xml/#type_commitType
7575
"""
7676

7777
def __init__(
@@ -200,7 +200,7 @@ class ComponentEvidence:
200200
Provides the ability to document evidence collected through various forms of extraction or analysis.
201201
202202
.. note::
203-
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.4/xml/#type_componentEvidenceType
203+
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.6/xml/#type_componentEvidenceType
204204
"""
205205

206206
def __init__(
@@ -299,7 +299,7 @@ class ComponentScope(str, Enum):
299299
Enum object that defines the permissable 'scopes' for a Component according to the CycloneDX schema.
300300
301301
.. note::
302-
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.3/#type_scope
302+
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.6/#type_scope
303303
"""
304304
# see `_ComponentScopeSerializationHelper.__CASES` for view/case map
305305
REQUIRED = 'required'
@@ -355,7 +355,7 @@ class ComponentType(str, Enum):
355355
Enum object that defines the permissible 'types' for a Component according to the CycloneDX schema.
356356
357357
.. note::
358-
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.3/#type_classification
358+
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.6/#type_classification
359359
"""
360360
# see `_ComponentTypeSerializationHelper.__CASES` for view/case map
361361
APPLICATION = 'application'
@@ -434,7 +434,7 @@ class Diff:
434434
Our internal representation of the `diffType` complex type.
435435
436436
.. note::
437-
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.4/xml/#type_diffType
437+
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.6/xml/#type_diffType
438438
"""
439439

440440
def __init__(
@@ -505,7 +505,7 @@ class PatchClassification(str, Enum):
505505
Enum object that defines the permissible `patchClassification`s.
506506
507507
.. note::
508-
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.4/xml/#type_patchClassification
508+
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.6/xml/#type_patchClassification
509509
"""
510510
BACKPORT = 'backport'
511511
CHERRY_PICK = 'cherry-pick'
@@ -519,7 +519,7 @@ class Patch:
519519
Our internal representation of the `patchType` complex type.
520520
521521
.. note::
522-
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.4/xml/#type_patchType
522+
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.6/xml/#type_patchType
523523
"""
524524

525525
def __init__(
@@ -612,7 +612,7 @@ class Pedigree:
612612
may not be known.
613613
614614
.. note::
615-
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.4/xml/#type_pedigreeType
615+
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.6/xml/#type_pedigreeType
616616
"""
617617

618618
def __init__(
@@ -769,7 +769,7 @@ class Swid:
769769
Our internal representation of the `swidType` complex type.
770770
771771
.. note::
772-
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.4/xml/#type_swidType
772+
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.6/xml/#type_swidType
773773
"""
774774

775775
def __init__(
@@ -1029,7 +1029,7 @@ class Component(Dependable):
10291029
This is our internal representation of a Component within a Bom.
10301030
10311031
.. note::
1032-
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.3/#type_component
1032+
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.6/#type_component
10331033
"""
10341034

10351035
@staticmethod

cyclonedx/model/contact.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ class OrganizationalContact:
194194
within a CycloneDX BOM document.
195195
196196
.. note::
197-
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.4/xml/#type_organizationalContact
197+
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.6/xml/#type_organizationalContact
198198
"""
199199

200200
def __init__(
@@ -287,7 +287,7 @@ class OrganizationalEntity:
287287
within a CycloneDX BOM document.
288288
289289
.. note::
290-
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.4/xml/#type_organizationalEntity
290+
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.6/xml/#type_organizationalEntity
291291
"""
292292

293293
def __init__(

cyclonedx/model/dependency.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class Dependency:
5353
Models a Dependency within a BOM.
5454
5555
.. note::
56-
See https://cyclonedx.org/docs/1.4/xml/#type_dependencyType
56+
See https://cyclonedx.org/docs/1.6/xml/#type_dependencyType
5757
"""
5858

5959
def __init__(self, ref: BomRef, dependencies: Optional[Iterable['Dependency']] = None) -> None:

cyclonedx/model/impact_analysis.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
Impact Analysis is new for CycloneDX schema version 1.
2323
2424
.. note::
25-
See the CycloneDX Schema extension definition https://cyclonedx.org/docs/1.4
25+
See the CycloneDX Schema extension definition https://cyclonedx.org/docs/1.6
2626
"""
2727

2828

@@ -45,7 +45,7 @@ class ImpactAnalysisAffectedStatus(str, Enum):
4545
has not disclosed the status.
4646
4747
.. note::
48-
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.4/#type_impactAnalysisAffectedStatusType
48+
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.6/#type_impactAnalysisAffectedStatusType
4949
"""
5050

5151
AFFECTED = 'affected'
@@ -59,7 +59,7 @@ class ImpactAnalysisJustification(str, Enum):
5959
Enum object that defines the rationale of why the impact analysis state was asserted.
6060
6161
.. note::
62-
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.4/#type_impactAnalysisJustificationType
62+
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.6/#type_impactAnalysisJustificationType
6363
"""
6464

6565
CODE_NOT_PRESENT = 'code_not_present'
@@ -79,7 +79,7 @@ class ImpactAnalysisResponse(str, Enum):
7979
Enum object that defines the valid rationales as to why the impact analysis state was asserted.
8080
8181
.. note::
82-
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.4/#type_impactAnalysisResponsesType
82+
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.6/#type_impactAnalysisResponsesType
8383
"""
8484

8585
CAN_NOT_FIX = 'can_not_fix'
@@ -95,7 +95,7 @@ class ImpactAnalysisState(str, Enum):
9595
Enum object that defines the permissible impact analysis states.
9696
9797
.. note::
98-
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.4/#type_impactAnalysisStateType
98+
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.6/#type_impactAnalysisStateType
9999
"""
100100

101101
RESOLVED = 'resolved'

cyclonedx/model/issue.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class IssueClassification(str, Enum):
3232
This is our internal representation of the enum `issueClassification`.
3333
3434
.. note::
35-
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.4/xml/#type_issueClassification
35+
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.6/xml/#type_issueClassification
3636
"""
3737
DEFECT = 'defect'
3838
ENHANCEMENT = 'enhancement'
@@ -46,7 +46,7 @@ class IssueTypeSource:
4646
places within a CycloneDX BOM document.
4747
4848
.. note::
49-
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.4/xml/#type_issueType
49+
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.6/xml/#type_issueType
5050
"""
5151

5252
def __init__(
@@ -118,7 +118,7 @@ class IssueType:
118118
a CycloneDX BOM document.
119119
120120
.. note::
121-
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.4/xml/#type_issueType
121+
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.6/xml/#type_issueType
122122
"""
123123

124124
def __init__(

cyclonedx/model/license.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class DisjunctiveLicense:
6464
a CycloneDX BOM document.
6565
6666
.. note::
67-
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.4/json/#components_items_licenses
67+
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.6/json/#components_items_licenses
6868
"""
6969

7070
def __init__(
@@ -94,7 +94,7 @@ def id(self) -> Optional[str]:
9494
9595
.. note::
9696
See the list of expected values:
97-
https://cyclonedx.org/docs/1.4/json/#components_items_licenses_items_license_id
97+
https://cyclonedx.org/docs/1.6/json/#components_items_licenses_items_license_id
9898
9999
Returns:
100100
`str` or `None`
@@ -246,7 +246,7 @@ class LicenseExpression:
246246
247247
.. note::
248248
See the CycloneDX Schema definition:
249-
https://cyclonedx.org/docs/1.4/json/#components_items_licenses_items_expression
249+
https://cyclonedx.org/docs/1.6/json/#components_items_licenses_items_expression
250250
"""
251251

252252
def __init__(

cyclonedx/model/lifecycle.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
Introduced in CycloneDX v1.5
2323
2424
.. note::
25-
See the CycloneDX Schema for lifecycles: https://cyclonedx.org/docs/1.5/#metadata_lifecycles
25+
See the CycloneDX Schema for lifecycles: https://cyclonedx.org/docs/1.6/#metadata_lifecycles
2626
"""
2727

2828
from enum import Enum
@@ -47,7 +47,7 @@ class LifecyclePhase(str, Enum):
4747
Enum object that defines the permissible 'phase' for a Lifecycle according to the CycloneDX schema.
4848
4949
.. note::
50-
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.3/#type_classification
50+
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.6/#type_classification
5151
"""
5252
DESIGN = 'design'
5353
PRE_BUILD = 'pre-build'
@@ -64,7 +64,7 @@ class PredefinedLifecycle:
6464
Object that defines pre-defined phases in the product lifecycle.
6565
6666
.. note::
67-
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.5/#metadata_lifecycles
67+
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.6/#metadata_lifecycles
6868
"""
6969

7070
def __init__(self, phase: LifecyclePhase) -> None:
@@ -103,7 +103,7 @@ class NamedLifecycle:
103103
Object that defines custom state in the product lifecycle.
104104
105105
.. note::
106-
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.5/#metadata_lifecycles
106+
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.6/#metadata_lifecycles
107107
"""
108108

109109
def __init__(self, name: str, *, description: Optional[str] = None) -> None:

cyclonedx/model/release_note.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class ReleaseNotes:
3131
This is our internal representation of a `releaseNotesType` for a Component in a BOM.
3232
3333
.. note::
34-
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.4/#type_releaseNotesType
34+
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.6/#type_releaseNotesType
3535
"""
3636

3737
def __init__(

0 commit comments

Comments
 (0)