Ignore some inspection

This commit is contained in:
Richard Chien 2018-07-04 09:44:15 +08:00
parent b00e31ad84
commit 89a11ab6e9

View File

@ -82,8 +82,10 @@ async def handle_natural_language(bot: NoneBot, ctx: Dict[str, Any]) -> bool:
if bot.config.NICKNAME:
# check if the user is calling me with my nickname
if not isinstance(bot.config.NICKNAME, Iterable):
# noinspection PyUnusedLocal
nicknames = (bot.config.NICKNAME,)
else:
# noinspection PyUnusedLocal
nicknames = filter(lambda n: n, bot.config.NICKNAME)
m = re.search(rf'^({"|".join(nicknames)})[\s,]+', msg)
if m: