App, lib: Add type annotations to untyped functions

Add missing type annotations to functions that are called from typed
contexts, satisfying the new disallow_untyped_calls mypy rule.

Fixes:
- Local.py: __log() with typed parameters
- lib/App.py: _add_arguments(), add_cmd_to_parser(), add_cmds_to_parser()
- pm/rpm.py, dpkg.py: meta_map() return type
- Exec.py: __init_askpass() return type
- App.py: strip_module_from_spec(), __get_project_refs_cached(),
  ResultCache.__init__ and run(), _add_arguments()
- Added Collection type for truthy-iterable compliance

Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL and pi.dev 0.81.1
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-07-22 22:48:42 +02:00
commit 410fd7ab5c
6 changed files with 26 additions and 15 deletions

View file

@ -11,7 +11,7 @@ from ..util import run_cmd, run_sudo
_meta_map: dict[str, str] | None = None
def meta_map():
def meta_map() -> dict[str, str]:
global _meta_map
if _meta_map is None:
_meta_map = Package.order_tags(