File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,9 @@ def getPackageInfoPypi(requirement: ucstr) -> PackageInfo:
8686 author = _pkgMetadataGet (info , "author" ),
8787 size = size ,
8888 license = ucstr (
89- licenseClassifier if licenseClassifier != UNKNOWN else info .get ("license" , UNKNOWN )
89+ licenseClassifier
90+ if licenseClassifier != UNKNOWN
91+ else info .get ("license" , UNKNOWN ) or UNKNOWN
9092 ),
9193 )
9294 except KeyError as error :
Original file line number Diff line number Diff line change @@ -11,12 +11,14 @@ class ucstr(str):
1111
1212 __slots__ = ()
1313
14- def __new__ (cls , v : str ) -> ucstr :
14+ def __new__ (cls , v : str | None ) -> ucstr :
1515 """Create a new ucstr from a str.
1616
1717 :param str v: string to cast
1818 :return ucstr: uppercase string.
1919 """
20+ if v is None :
21+ return ucstr ("" )
2022 return super ().__new__ (cls , v .upper ())
2123
2224
You can’t perform that action at this time.
0 commit comments