Skip to content

Commit f1ac839

Browse files
authored
Add license expression data from pypi API (#207)
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
1 parent 09d4554 commit f1ac839

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/python_inspector/package_data.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ def get_pypi_data_from_purl(
9393
api_data_url=api_url,
9494
bug_tracking_url=bug_tracking_url,
9595
code_view_url=code_view_url,
96+
license_expression=info.get("license_expression"),
9697
declared_license=get_declared_license(info),
9798
download_url=dist_url,
9899
size=url.get("size"),

tests/data/example-requirements-ignore-errors-expected.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@
257257
"code_view_url": null,
258258
"vcs_url": null,
259259
"copyright": null,
260-
"license_expression": null,
260+
"license_expression": "MIT",
261261
"declared_license": {
262262
"classifiers": [
263263
"License :: OSI Approved :: MIT License"
@@ -321,7 +321,7 @@
321321
"code_view_url": null,
322322
"vcs_url": null,
323323
"copyright": null,
324-
"license_expression": null,
324+
"license_expression": "MIT",
325325
"declared_license": {
326326
"classifiers": [
327327
"License :: OSI Approved :: MIT License"

0 commit comments

Comments
 (0)