We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 232b674 commit 1b2e458Copy full SHA for 1b2e458
1 file changed
licensecheck/packageinfo.py
@@ -143,6 +143,9 @@ def getClassifiersLicense() -> dict[str, Any]:
143
return tool["poetry"]
144
if "flit" in tool:
145
return tool["flit"]["metadata"]
146
+ if pyproject.get("project") is not None:
147
+ return pyproject["project"]
148
+
149
return {"classifiers": [], "license": ""}
150
151
@@ -158,7 +161,10 @@ def getMyPackageLicense() -> str:
158
161
if licenseClassifier != UNKNOWN:
159
162
return licenseClassifier
160
163
if "license" in metaData:
- return str(metaData["license"])
164
+ if isinstance(metaData["license"], dict) and metaData["license"].get("text") is not None:
165
+ return str(metaData["license"].get("text"))
166
+ else:
167
+ return str(metaData["license"])
168
return input("Enter the project license")
169
170
0 commit comments