From c6795050534cdd47f2e4fda618bce270ffd5bc8d Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Fri, 13 Nov 2026 14:40:14 +0100 Subject: [PATCH] Options.__init__(): Annotate __allowed_keys as Any mypy 2.4.0 infers the attribute from the None assignment in __init__() and then flags the right operand of the and check in __parse__() as unreachable code, failing make check. The attribute is only ever assigned None, so annotate it as Any and keep the runtime behaviour unchanged. Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v1.5.2 Signed-off-by: Jan Lindemann --- src/python/jw/util/Options.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/jw/util/Options.py b/src/python/jw/util/Options.py index 2bc75d7..402ca05 100644 --- a/src/python/jw/util/Options.py +++ b/src/python/jw/util/Options.py @@ -126,7 +126,7 @@ class Options: # export true_val: Any = True ) -> None: self.__true_val = true_val - self.__allowed_keys = None + self.__allowed_keys: Any = None self.__delimiter = delimiter self.__data = ( self.__class__.OrderedData()