Skip to content

Commit f042bce

Browse files
Fix more type hints for python < 3.8
Signed-off-by: Rodney Richardson <[email protected]>
1 parent 2e283ab commit f042bce

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cyclonedx/output/xml.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ def _add_component_element(self, component: Component) -> ElementTree.Element:
373373

374374
return component_element
375375

376-
def _add_licenses_to_element(self, licenses: SortedSet[LicenseChoice], parent_element: ElementTree.Element) -> bool:
376+
def _add_licenses_to_element(self, licenses: "SortedSet[LicenseChoice]", parent_element: ElementTree.Element) -> bool:
377377
license_output = False
378378
for license_ in licenses:
379379
if license_.license:
@@ -476,7 +476,7 @@ def add_patch_element(patch: Patch) -> ElementTree.Element:
476476
return patch_element
477477

478478
@staticmethod
479-
def _add_properties_element(properties: SortedSet[Property], parent_element: ElementTree.Element) -> None:
479+
def _add_properties_element(properties: "SortedSet[Property]", parent_element: ElementTree.Element) -> None:
480480
properties_e = ElementTree.SubElement(parent_element, 'properties')
481481
for property_ in properties:
482482
ElementTree.SubElement(
@@ -754,7 +754,7 @@ def _get_vulnerability_as_xml_element_pre_1_3(bom_ref: BomRef,
754754

755755
return vulnerability_element
756756

757-
def _add_external_references_to_element(self, ext_refs: SortedSet[ExternalReference],
757+
def _add_external_references_to_element(self, ext_refs: "SortedSet[ExternalReference]",
758758
element: ElementTree.Element) -> None:
759759
ext_refs_element = ElementTree.SubElement(element, 'externalReferences')
760760
for external_reference in ext_refs:
@@ -779,7 +779,7 @@ def _add_attached_text(attached_text: AttachedText, tag_name: str = 'text') -> E
779779
return at_element
780780

781781
@staticmethod
782-
def _add_hashes_to_element(hashes: SortedSet[HashType], element: ElementTree.Element) -> None:
782+
def _add_hashes_to_element(hashes: "SortedSet[HashType]", element: ElementTree.Element) -> None:
783783
hashes_e = ElementTree.SubElement(element, 'hashes')
784784
for h in hashes:
785785
ElementTree.SubElement(

0 commit comments

Comments
 (0)