Skip to content

Commit

Permalink
ensure licenses are mapped to self
Browse files Browse the repository at this point in the history
  • Loading branch information
ytausch committed Jul 23, 2024
1 parent 90c9fa1 commit 3f0fed6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions grayskull/license/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ def match_license(name: str) -> dict:
name = re.sub(r"\s+license\s*", "", name.strip(), flags=re.IGNORECASE)
name = name.strip()

if name in _get_all_license_choice(all_licenses):
return _get_license(name, all_licenses)

best_matches = process.extract(
name, _get_all_license_choice(all_licenses), scorer=partial_ratio
)
Expand Down

0 comments on commit 3f0fed6

Please sign in to comment.