Skip to content

Commit 983ec3b

Browse files
fix type
1 parent 5ddf881 commit 983ec3b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

exasol/toolbox/nox/_dependencies.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ def is_multi_license(l):
5555

5656
def select_most_restrictive(licenses: list) -> str:
5757
_max = 0
58+
lic = "Unknown"
5859
_mapping = {
60+
"Unknown": -1,
5961
"Unlicensed": 0,
6062
"BSD": 1,
6163
"MIT": 2,
@@ -66,11 +68,11 @@ def select_most_restrictive(licenses: list) -> str:
6668
}
6769
for l in licenses:
6870
if l in _mapping:
69-
if _mapping[l] > _max:
70-
_max = _mapping[l]
71+
if _mapping[l] > _mapping[lic]:
72+
lic = l
7173
else:
7274
return "<br>".join(licenses)
73-
return _mapping[_max]
75+
return lic
7476

7577
mapping = {
7678
"BSD License": "BSD",

0 commit comments

Comments
 (0)