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 <jan@janware.com>
This commit is contained in:
parent
913a6f32a7
commit
c679505053
1 changed files with 1 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue