We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2aaf89c + 3c18388 commit 9e192f8Copy full SHA for 9e192f8
1 file changed
licensecheck/packageinfo.py
@@ -136,6 +136,9 @@ def getClassifiersLicense() -> dict[str, Any]:
136
return tool["poetry"]
137
if "flit" in tool:
138
return tool["flit"]["metadata"]
139
+ if pyproject.get("project") is not None:
140
+ return pyproject["project"]
141
+
142
return {"classifiers": [], "license": ""}
143
144
@@ -150,7 +153,10 @@ def getMyPackageLicense() -> str:
150
153
if licenseClassifier != UNKNOWN:
151
154
return licenseClassifier
152
155
if "license" in metaData:
- return str(metaData["license"])
156
+ if isinstance(metaData["license"], dict) and metaData["license"].get("text") is not None:
157
+ return str(metaData["license"].get("text"))
158
+ else:
159
+ return str(metaData["license"])
160
return input("Enter the project license")
161
162
0 commit comments