mypy: Fix disallow_untyped_calls type errors

Add return type annotations and fix type mismatches to satisfy
disallow_untyped_calls:

- ShuntingYard.py: Operator.func -> Any|None, add assert for None
- ShellCmd.py: format_cmdline, __reap, __exec, __cleanup,
  SubprocessProtocol.__init__ return types, fix unreachable code
- TableIoHandler.py: cast _load() return to List[Dict[str, Any]]
- rows.py: add cast import, cast rows_dumps() return
- CompositeForeignKey.py: __table() cast fix, remove TYPE_CHECKING
- ldap.py: collect() parameter type ObjectClass
- multi_key_dict.py: get(), itervalues(), test function types,
  fix variable name conflicts, add set[Any] annotations

Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL with pi.dev v0.82.0
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-07-24 22:20:48 +02:00 • committed by janware DevOps
commit 4fda12ce6a
Signed by: DevOps
SSH key fingerprint: SHA256:cZiw7ExG5q3KAVm7Jse3rGITowu0VjgUgNMPbifmY8g

View file

@ -326,7 +326,7 @@ class Connection: # export
if self.__object_class_tree is None:
def collect(root: str, attr: str) -> set[str]:
def collect(root: ObjectClass, attr: str) -> set[str]:
ret = set()
def cb(oc, attr):