Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion licensecheck/packageinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def get_package_info(self, package: PackageInfo) -> PackageInfo:
return pkg_info

tokens = sorted(parsed.literals)
pkg_info.license = ucstr(JOINS.join(x.key for x in tokens))
pkg_info.license = ucstr(JOINS.join(getattr(x, "key", str(x)) for x in tokens))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pkg_info.license = ucstr(JOINS.join(getattr(x, "key", str(x)) for x in tokens))
final_keys = []
for token in parsed.literals:
final_keys.extend(sub_symbol.key for sub_symbol in token.decompose())
pkg_info.license = ucstr(JOINS.join(finals_keys))

Maybe use the decompose function to get the symbols and not fallback to a simple string representation?


return pkg_info

Expand Down
1 change: 1 addition & 0 deletions tests/data/issue_137.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
llvmlite==0.46.0