Sync the tree with current mypy and isort #4

Merged
Jan Lindemann merged 2 commits from jan/fix/20261113-sync-the-tree-with-current-mypy-and-isort into master 2026-11-13 15:20:34 +01:00 AGit
Showing only changes of commit c679505053 - Show all commits

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>
Jan Lindemann 2026-11-13 14:40:14 +01:00
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61

View file

@ -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()