Distro, Cmd, AsyncSSH: Fix bare generic types

Add explicit type arguments to all generic type annotations that were
previously bare, satisfying the new disallow_any_generics mypy rule.

Fixes:
- Distro.py: Iterable[str] for expand_macros fmt parameter
- Cmd.py: Types[Any] for add_subcommands cmds parameter
- AsyncSSH.py: dict[str, Any] for _connect_kwargs return type

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:19:16 +02:00
commit 49bf2b2442
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61
3 changed files with 9 additions and 7 deletions

View file

@ -1,4 +1,4 @@
from typing import override
from typing import Any, override
import asyncio
import os
import shlex
@ -58,8 +58,8 @@ class AsyncSSH(Base):
log(DEBUG, f'Failed to close connection ({str(e)}, ignored)')
self.__conn = None
def _connect_kwargs(self, hide_secrets: bool = False) -> dict:
kwargs: dict = {
def _connect_kwargs(self, hide_secrets: bool = False) -> dict[str, Any]:
kwargs: dict[str, Any] = {
'host': self.hostname,
'port': self.port,
'username': self.username,