@@ -73,9 +73,14 @@ class Commit:
7373 See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.4/xml/#type_commitType
7474 """
7575
76- def __init__ (self , * , uid : Optional [str ] = None , url : Optional [XsUri ] = None ,
77- author : Optional [IdentifiableAction ] = None , committer : Optional [IdentifiableAction ] = None ,
78- message : Optional [str ] = None ) -> None :
76+ def __init__ (
77+ self , * ,
78+ uid : Optional [str ] = None ,
79+ url : Optional [XsUri ] = None ,
80+ author : Optional [IdentifiableAction ] = None ,
81+ committer : Optional [IdentifiableAction ] = None ,
82+ message : Optional [str ] = None ,
83+ ) -> None :
7984 if not uid and not url and not author and not committer and not message :
8085 raise NoPropertiesProvidedException (
8186 'At least one of `uid`, `url`, `author`, `committer` or `message` must be provided for a `Commit`.'
@@ -195,8 +200,11 @@ class ComponentEvidence:
195200 See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.4/xml/#type_componentEvidenceType
196201 """
197202
198- def __init__ (self , * , licenses : Optional [Iterable [License ]] = None ,
199- copyright : Optional [Iterable [Copyright ]] = None ) -> None :
203+ def __init__ (
204+ self , * ,
205+ licenses : Optional [Iterable [License ]] = None ,
206+ copyright : Optional [Iterable [Copyright ]] = None ,
207+ ) -> None :
200208 if not licenses and not copyright :
201209 raise NoPropertiesProvidedException (
202210 'At least one of `licenses` or `copyright` must be supplied for a `ComponentEvidence`.'
@@ -426,7 +434,11 @@ class Diff:
426434 See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.4/xml/#type_diffType
427435 """
428436
429- def __init__ (self , * , text : Optional [AttachedText ] = None , url : Optional [XsUri ] = None ) -> None :
437+ def __init__ (
438+ self , * ,
439+ text : Optional [AttachedText ] = None ,
440+ url : Optional [XsUri ] = None ,
441+ ) -> None :
430442 if not text and not url :
431443 raise NoPropertiesProvidedException (
432444 'At least one of `text` or `url` must be provided for a `Diff`.'
@@ -507,8 +519,12 @@ class Patch:
507519 See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.4/xml/#type_patchType
508520 """
509521
510- def __init__ (self , * , type : PatchClassification , diff : Optional [Diff ] = None ,
511- resolves : Optional [Iterable [IssueType ]] = None ) -> None :
522+ def __init__ (
523+ self , * ,
524+ type : PatchClassification ,
525+ diff : Optional [Diff ] = None ,
526+ resolves : Optional [Iterable [IssueType ]] = None ,
527+ ) -> None :
512528 self .type = type
513529 self .diff = diff
514530 self .resolves = resolves or [] # type:ignore[assignment]
@@ -596,10 +612,15 @@ class Pedigree:
596612 See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.4/xml/#type_pedigreeType
597613 """
598614
599- def __init__ (self , * , ancestors : Optional [Iterable ['Component' ]] = None ,
600- descendants : Optional [Iterable ['Component' ]] = None , variants : Optional [Iterable ['Component' ]] = None ,
601- commits : Optional [Iterable [Commit ]] = None , patches : Optional [Iterable [Patch ]] = None ,
602- notes : Optional [str ] = None ) -> None :
615+ def __init__ (
616+ self , * ,
617+ ancestors : Optional [Iterable ['Component' ]] = None ,
618+ descendants : Optional [Iterable ['Component' ]] = None ,
619+ variants : Optional [Iterable ['Component' ]] = None ,
620+ commits : Optional [Iterable [Commit ]] = None ,
621+ patches : Optional [Iterable [Patch ]] = None ,
622+ notes : Optional [str ] = None ,
623+ ) -> None :
603624 if not ancestors and not descendants and not variants and not commits and not patches and not notes :
604625 raise NoPropertiesProvidedException (
605626 'At least one of `ancestors`, `descendants`, `variants`, `commits`, `patches` or `notes` must be '
@@ -748,9 +769,16 @@ class Swid:
748769 See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.4/xml/#type_swidType
749770 """
750771
751- def __init__ (self , * , tag_id : str , name : str , version : Optional [str ] = None ,
752- tag_version : Optional [int ] = None , patch : Optional [bool ] = None ,
753- text : Optional [AttachedText ] = None , url : Optional [XsUri ] = None ) -> None :
772+ def __init__ (
773+ self , * ,
774+ tag_id : str ,
775+ name : str ,
776+ version : Optional [str ] = None ,
777+ tag_version : Optional [int ] = None ,
778+ patch : Optional [bool ] = None ,
779+ text : Optional [AttachedText ] = None ,
780+ url : Optional [XsUri ] = None ,
781+ ) -> None :
754782 self .tag_id = tag_id
755783 self .name = name
756784 self .version = version
@@ -1031,25 +1059,40 @@ def for_file(absolute_file_path: str, path_for_bom: Optional[str]) -> 'Component
10311059 )
10321060 )
10331061
1034- def __init__ (self , * ,
1035- name : str , type : ComponentType = ComponentType .LIBRARY ,
1036- mime_type : Optional [str ] = None , bom_ref : Optional [Union [str , BomRef ]] = None ,
1037- supplier : Optional [OrganizationalEntity ] = None ,
1038- publisher : Optional [str ] = None , group : Optional [str ] = None , version : Optional [str ] = None ,
1039- description : Optional [str ] = None , scope : Optional [ComponentScope ] = None ,
1040- hashes : Optional [Iterable [HashType ]] = None , licenses : Optional [Iterable [License ]] = None ,
1041- copyright : Optional [str ] = None , purl : Optional [PackageURL ] = None ,
1042- external_references : Optional [Iterable [ExternalReference ]] = None ,
1043- properties : Optional [Iterable [Property ]] = None , release_notes : Optional [ReleaseNotes ] = None ,
1044- cpe : Optional [str ] = None , swid : Optional [Swid ] = None , pedigree : Optional [Pedigree ] = None ,
1045- components : Optional [Iterable ['Component' ]] = None , evidence : Optional [ComponentEvidence ] = None ,
1046- modified : bool = False , manufacturer : Optional [OrganizationalEntity ] = None ,
1047- authors : Optional [Iterable [OrganizationalContact ]] = None ,
1048- omnibor_ids : Optional [Iterable [OmniborId ]] = None , swhids : Optional [Iterable [Swhid ]] = None ,
1049- crypto_properties : Optional [CryptoProperties ] = None , tags : Optional [Iterable [str ]] = None ,
1050- # Deprecated in v1.6
1051- author : Optional [str ] = None ,
1052- ) -> None :
1062+ def __init__ (
1063+ self , * ,
1064+ name : str ,
1065+ type : ComponentType = ComponentType .LIBRARY ,
1066+ mime_type : Optional [str ] = None ,
1067+ bom_ref : Optional [Union [str , BomRef ]] = None ,
1068+ supplier : Optional [OrganizationalEntity ] = None ,
1069+ publisher : Optional [str ] = None ,
1070+ group : Optional [str ] = None ,
1071+ version : Optional [str ] = None ,
1072+ description : Optional [str ] = None ,
1073+ scope : Optional [ComponentScope ] = None ,
1074+ hashes : Optional [Iterable [HashType ]] = None ,
1075+ licenses : Optional [Iterable [License ]] = None ,
1076+ copyright : Optional [str ] = None ,
1077+ purl : Optional [PackageURL ] = None ,
1078+ external_references : Optional [Iterable [ExternalReference ]] = None ,
1079+ properties : Optional [Iterable [Property ]] = None ,
1080+ release_notes : Optional [ReleaseNotes ] = None ,
1081+ cpe : Optional [str ] = None ,
1082+ swid : Optional [Swid ] = None ,
1083+ pedigree : Optional [Pedigree ] = None ,
1084+ components : Optional [Iterable ['Component' ]] = None ,
1085+ evidence : Optional [ComponentEvidence ] = None ,
1086+ modified : bool = False ,
1087+ manufacturer : Optional [OrganizationalEntity ] = None ,
1088+ authors : Optional [Iterable [OrganizationalContact ]] = None ,
1089+ omnibor_ids : Optional [Iterable [OmniborId ]] = None ,
1090+ swhids : Optional [Iterable [Swhid ]] = None ,
1091+ crypto_properties : Optional [CryptoProperties ] = None ,
1092+ tags : Optional [Iterable [str ]] = None ,
1093+ # Deprecated in v1.6
1094+ author : Optional [str ] = None ,
1095+ ) -> None :
10531096 self .type = type
10541097 self .mime_type = mime_type
10551098 if isinstance (bom_ref , BomRef ):
0 commit comments