File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -39,10 +39,10 @@ def licenses(self) -> str:
39
39
except PackageNotFoundError :
40
40
return self .UNKNOWN_LICENSE_STR
41
41
42
- license_strs : list [str ] = []
43
42
if license_str := dist_metadata .get ("License-Expression" ):
44
- license_strs . append ( license_str )
43
+ return f"( { license_str } )"
45
44
45
+ license_strs : list [str ] = []
46
46
classifiers = dist_metadata .get_all ("Classifier" , [])
47
47
for classifier in classifiers :
48
48
line = str (classifier )
Original file line number Diff line number Diff line change @@ -148,10 +148,10 @@ def test_dist_package_as_dict() -> None:
148
148
Mock (
149
149
get = lambda * args , ** kwargs : "MIT" , # noqa: ARG005
150
150
get_all = lambda * args , ** kwargs : [ # noqa: ARG005
151
- "License :: OSI Approved :: GNU General Public License v2 (GPLv2) " ,
151
+ "License :: OSI Approved :: MIT License" ,
152
152
],
153
153
),
154
- "(MIT, GNU General Public License v2 (GPLv2) )" ,
154
+ "(MIT)" ,
155
155
id = "license-expression-with-license-classifier" ,
156
156
),
157
157
],
You can’t perform that action at this time.
0 commit comments