From 24383d9ae9bd6981bc7b304f9cb6215b81348da8 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Sat, 20 Sep 2025 08:27:23 +0200 Subject: [PATCH] Fix mypy error. --- ircplom/msg_parse_expectations.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ircplom/msg_parse_expectations.py b/ircplom/msg_parse_expectations.py index a394e48..9141836 100644 --- a/ircplom/msg_parse_expectations.py +++ b/ircplom/msg_parse_expectations.py @@ -106,7 +106,8 @@ class _MsgParseExpectation: for idx, ex_tok in enumerate(ex_fields)]: if isinstance(ex_tok.type_, str) and ex_tok.type_ != cmp_tok: return None - if ex_tok.type_ in validators\ + if (not isinstance(ex_tok.type_, str))\ + and ex_tok.type_ in validators\ and not validators[ex_tok.type_](cmp_tok): return None if ex_tok.code or ex_tok.type_ is _MsgTok.NICK_USER_HOST: -- 2.30.2