修复别名

This commit is contained in:
惜月 2022-12-24 12:03:25 +08:00 committed by GitHub
parent 268670e61a
commit c0d0fdc21d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -90,7 +90,7 @@ def get_match_alias(name: str, types: Union[List[ALIAS_TYPE], ALIAS_TYPE] = None
for alias in alias_list.values(): for alias in alias_list.values():
if name in alias: if name in alias:
if len(types) == 1 and one_to_list: if len(types) == 1 and one_to_list:
return [name] return [alias[0]]
matches[type].append(alias[0]) matches[type].append(alias[0])
break break
if get_close_matches(name, alias, cutoff=0.6, n=3): if get_close_matches(name, alias, cutoff=0.6, n=3):