home · contact · privacy
Fix mypy error. master
authorChristian Heller <c.heller@plomlompom.de>
Sat, 20 Sep 2025 06:27:23 +0000 (08:27 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Sat, 20 Sep 2025 06:27:23 +0000 (08:27 +0200)
ircplom/msg_parse_expectations.py

index a394e4897300eb755577f2800ec40f179423017c..914183620f1aa44da8f5731bfb0a38cc40223df8 100644 (file)
@@ -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: