diff --git a/src/python_inspector/package_data.py b/src/python_inspector/package_data.py index c4b0825d..96825463 100644 --- a/src/python_inspector/package_data.py +++ b/src/python_inspector/package_data.py @@ -93,6 +93,7 @@ def get_pypi_data_from_purl( api_data_url=api_url, bug_tracking_url=bug_tracking_url, code_view_url=code_view_url, + license_expression=info.get("license_expression"), declared_license=get_declared_license(info), download_url=dist_url, size=url.get("size"), diff --git a/tests/data/example-requirements-ignore-errors-expected.json b/tests/data/example-requirements-ignore-errors-expected.json index 5ebd6b3c..a7f67568 100644 --- a/tests/data/example-requirements-ignore-errors-expected.json +++ b/tests/data/example-requirements-ignore-errors-expected.json @@ -257,7 +257,7 @@ "code_view_url": null, "vcs_url": null, "copyright": null, - "license_expression": null, + "license_expression": "MIT", "declared_license": { "classifiers": [ "License :: OSI Approved :: MIT License" @@ -321,7 +321,7 @@ "code_view_url": null, "vcs_url": null, "copyright": null, - "license_expression": null, + "license_expression": "MIT", "declared_license": { "classifiers": [ "License :: OSI Approved :: MIT License"