Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

License alias order incorrect #69

Closed
hesa opened this issue Nov 6, 2023 · 0 comments
Closed

License alias order incorrect #69

hesa opened this issue Nov 6, 2023 · 0 comments
Assignees
Labels
bug Something isn't working python

Comments

@hesa
Copy link
Owner

hesa commented Nov 6, 2023

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

@hesa hesa added bug Something isn't working python labels Nov 6, 2023
@hesa hesa self-assigned this Nov 6, 2023
hesa added a commit that referenced this issue Nov 11, 2023
@hesa hesa closed this as completed Nov 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working python
Projects
None yet
Development

No branches or pull requests

1 participant