mypy: Fix disallow_untyped_calls check fallout
Add return type annotations and parameter type hints to previously untyped functions, preparing for disallow_untyped_calls enforcement: - ArgsContainer.py: keys() -> Iterable[str] - Object.py: Object.__init__() -> None - ShuntingYard.py: tokenize(), infix_to_postfix(), __init__(), add_operator(), Stack methods, debug(), Calculator/Matcher.__init__() - ShellCmd.py: __exec(), __cleanup(), init(), cleanup(), __init__() - Auth.py: __bind() -> Connection, import Connection - TableIoHandler.py: _check_non_nullable() -> None, buf annotation - Queries.py: _add() -> None - rows.py: __equal(), rows_duplicates(), rows_check_not_null(), rows_dump(), rows_dumps() with proper type signatures - CompositeForeignKey.py: __table() -> Table - EventRouter.py: iter_peers() -> Iterator[tuple[str, Any]] - MapAttr2Shape.py: __value(), __add_key_nodegraphics() - ldap.py: __search() -> str, collect() -> set[str] - multi_key_dict.py: has_key(), get_other_keys(), iterkeys(), get_values_from_str(), test_multi_key_dict(), __init__(), items_dict annotation 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:
parent
ec342ba172
commit
e014a9251f
1 changed files with 76 additions and 66 deletions
|
|
@ -239,7 +239,7 @@ class Connection: # export
|
|||
def __walk_cb_find(conn: Connection, entry: Any, context: Any):
|
||||
result.append(entry)
|
||||
|
||||
def __search():
|
||||
def __search() -> str:
|
||||
return f'{base} -> "{filterstr}"'
|
||||
|
||||
try:
|
||||
|
|
@ -326,7 +326,7 @@ class Connection: # export
|
|||
|
||||
if self.__object_class_tree is None:
|
||||
|
||||
def collect(root, attr):
|
||||
def collect(root: str, attr: str) -> set[str]:
|
||||
ret = set()
|
||||
|
||||
def cb(oc, attr):
|
||||
|
|
|
|||
Loading…
Reference in a new issue