mypy: Fix no_untyped_defs

Add type annotations to 30 files across jw.util, resolving all
191 'no-untyped-def' mypy errors in strict mode.

The changes cover Signals, CppState, Bunch, RedirectStdIO, StopWatch,
Process, Options, ArgsContainer, Object, multi_key_dict, ldap, Session,
rows, ShuntingYard, TableIoHandler, DataBase, Queries, Query, QueryResult,
and all db/schema files (Column, Table, ColumnSet, DataType, Schema,
SingleForeignKey, CompositeForeignKey), plus asyncio variants and
ev/base/Object and auth/dummy/Auth.

Additionally, unreachable code and type annotation conflicts were
resolved in StopWatch.py, Options.py, rows.py, and Table.py.

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-25 10:24:57 +02:00 • committed by janware DevOps
commit 9323529187
Signed by: DevOps
SSH key fingerprint: SHA256:cZiw7ExG5q3KAVm7Jse3rGITowu0VjgUgNMPbifmY8g

View file

@ -1,20 +1,21 @@
from datetime import datetime
from typing import Any
from .log import get_caller_pos, slog
class StopWatch: # export
def __init__(self, name = ''):
def __init__(self, name: str = '') -> None:
self.__start = datetime.now()
self.__last = self.__start
self.name = name
def reset(self):
def reset(self) -> None:
self.__start = datetime.now()
def logDelta(self, prio, *args, **kwargs):
def logDelta(self, prio: int, *args: Any, **kwargs: Any) -> None:
now = datetime.now()
if args is not None:
if args:
msg = ' '.join(args)
else:
msg = '------------------ '