hesa / foss-licenses

License meta information
6 stars 1 forks source link

License alias order incorrect #69

Closed hesa closed 11 months ago

hesa commented 11 months ago

License aliases are supposed to be replaced longest in size first.

Current solution (license_db.py): for needle in reversed(collections.OrderedDict(sorted(needles.items()))): does not do that. Replace the above with: for needle in reversed(collections.OrderedDict(sorted(needles.items(), key = lambda x : len(x[0])))):

and things should be fine