mirror of
https://github.com/PaiGramTeam/MibooGram.git
synced 2024-11-29 19:08:46 +00:00
✏️ typo
This commit is contained in:
parent
410dad1a03
commit
53f4079479
@ -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)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user