From: Benjamin Robin (Schneider Electric) Date: Mon, 20 Apr 2026 07:44:32 +0000 (+0200) Subject: oe/sbom30: Remove unneeded oe.sbom30. to reference local symbol X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=6cda57345b480119b262de299461dfee305d5e64;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git oe/sbom30: Remove unneeded oe.sbom30. to reference local symbol The class OEDocumentExtension is declared within the sbom30.py file. There is no need to use its full package path to reference it. Same for get_element_link_id() function. Signed-off-by: Benjamin Robin (Schneider Electric) Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oe/sbom30.py b/meta/lib/oe/sbom30.py index b386b0f55b..9f50821af0 100644 --- a/meta/lib/oe/sbom30.py +++ b/meta/lib/oe/sbom30.py @@ -279,7 +279,7 @@ class ObjectSet(oe.spdx30.SHACLObjectSet): def is_native(self): for e in self.doc.extension: - if not isinstance(e, oe.sbom30.OEDocumentExtension): + if not isinstance(e, OEDocumentExtension): continue if e.is_native is not None: @@ -289,14 +289,14 @@ class ObjectSet(oe.spdx30.SHACLObjectSet): def set_is_native(self, is_native): for e in self.doc.extension: - if not isinstance(e, oe.sbom30.OEDocumentExtension): + if not isinstance(e, OEDocumentExtension): continue e.is_native = is_native return if is_native: - self.doc.extension.append(oe.sbom30.OEDocumentExtension(is_native=True)) + self.doc.extension.append(OEDocumentExtension(is_native=True)) def add_aliases(self): for o in self.foreach_type(oe.spdx30.Element): @@ -633,7 +633,7 @@ class ObjectSet(oe.spdx30.SHACLObjectSet): self.new_relationship( [spdx_file], oe.spdx30.RelationshipType.hasDeclaredLicense, - [oe.sbom30.get_element_link_id(lic_alias) for lic_alias in file_licenses], + [get_element_link_id(lic_alias) for lic_alias in file_licenses], ) spdx_file.extension.append(OELicenseScannedExtension())