33# SPDX-License-Identifier: Apache-2.0
44from datetime import datetime
55
6- from license_expression import get_spdx_licensing
7-
6+ from spdx_tools .common .spdx_licensing import spdx_licensing
87from spdx_tools .spdx .constants import DOCUMENT_SPDX_ID
98from spdx_tools .spdx .model import (
109 Actor ,
@@ -88,7 +87,7 @@ def file_fixture(
8887 spdx_id = "SPDXRef-File" ,
8988 checksums = None ,
9089 file_types = None ,
91- license_concluded = get_spdx_licensing () .parse ("MIT and GPL-2.0" ),
90+ license_concluded = spdx_licensing .parse ("MIT and GPL-2.0" ),
9291 license_info_in_file = None ,
9392 license_comment = "licenseComment" ,
9493 copyright_text = "copyrightText" ,
@@ -100,7 +99,7 @@ def file_fixture(
10099 checksums = [checksum_fixture ()] if checksums is None else checksums
101100 file_types = [FileType .TEXT ] if file_types is None else file_types
102101 license_info_in_file = (
103- [get_spdx_licensing () .parse ("MIT" ), get_spdx_licensing () .parse ("GPL-2.0" ), SpdxNoAssertion ()]
102+ [spdx_licensing .parse ("MIT" ), spdx_licensing .parse ("GPL-2.0" ), SpdxNoAssertion ()]
104103 if license_info_in_file is None
105104 else license_info_in_file
106105 )
@@ -135,9 +134,9 @@ def package_fixture(
135134 checksums = None ,
136135 homepage = "https://homepage.com" ,
137136 source_info = "sourceInfo" ,
138- license_concluded = get_spdx_licensing () .parse ("MIT and GPL-2.0" ),
137+ license_concluded = spdx_licensing .parse ("MIT and GPL-2.0" ),
139138 license_info_from_files = None ,
140- license_declared = get_spdx_licensing () .parse ("MIT and GPL-2.0" ),
139+ license_declared = spdx_licensing .parse ("MIT and GPL-2.0" ),
141140 license_comment = "packageLicenseComment" ,
142141 copyright_text = "packageCopyrightText" ,
143142 summary = "packageSummary" ,
@@ -152,7 +151,7 @@ def package_fixture(
152151) -> Package :
153152 checksums = [checksum_fixture ()] if checksums is None else checksums
154153 license_info_from_files = (
155- [get_spdx_licensing () .parse ("MIT" ), get_spdx_licensing () .parse ("GPL-2.0" ), SpdxNoAssertion ()]
154+ [spdx_licensing .parse ("MIT" ), spdx_licensing .parse ("GPL-2.0" ), SpdxNoAssertion ()]
156155 if license_info_from_files is None
157156 else license_info_from_files
158157 )
@@ -208,7 +207,7 @@ def snippet_fixture(
208207 file_spdx_id = "SPDXRef-File" ,
209208 byte_range = (1 , 2 ),
210209 line_range = (3 , 4 ),
211- license_concluded = get_spdx_licensing () .parse ("MIT and GPL-2.0" ),
210+ license_concluded = spdx_licensing .parse ("MIT and GPL-2.0" ),
212211 license_info_in_snippet = None ,
213212 license_comment = "snippetLicenseComment" ,
214213 copyright_text = "licenseCopyrightText" ,
@@ -217,7 +216,7 @@ def snippet_fixture(
217216 attribution_texts = None ,
218217) -> Snippet :
219218 license_info_in_snippet = (
220- [get_spdx_licensing () .parse ("MIT" ), get_spdx_licensing () .parse ("GPL-2.0" ), SpdxNone ()]
219+ [spdx_licensing .parse ("MIT" ), spdx_licensing .parse ("GPL-2.0" ), SpdxNone ()]
221220 if license_info_in_snippet is None
222221 else license_info_in_snippet
223222 )
0 commit comments