✏️ typo

This commit is contained in:
Li Chuangbo 2022-10-10 14:16:14 +08:00
parent 410dad1a03
commit 53f4079479
No known key found for this signature in database

View File

@ -187,7 +187,7 @@ weapons = {
# noinspection PyPep8Naming # noinspection PyPep8Naming
@functools.lru_cache() @functools.lru_cache()
def roleToName(shortname: str) -> str: def roleToName(shortname: str) -> str:
"""角色昵称转为正式名""" """角色昵称转为正式名"""
return next((value[0] for value in roles.values() for name in value if name == shortname), shortname) return next((value[0] for value in roles.values() for name in value if name == shortname), shortname)
@ -201,7 +201,7 @@ def roleToId(name: str) -> int | None:
# noinspection PyPep8Naming # noinspection PyPep8Naming
@functools.lru_cache() @functools.lru_cache()
def weaponToName(shortname: str) -> str: def weaponToName(shortname: str) -> str:
"""武器昵称转为正式名""" """武器昵称转为正式名"""
return next((key for key, value in weapons.items() if shortname == key or shortname in value), shortname) return next((key for key, value in weapons.items() if shortname == key or shortname in value), shortname)