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:
parent
7f1809d6d1
commit
49bf2b2442
3 changed files with 9 additions and 7 deletions
|
|
@ -278,7 +278,7 @@ class Distro(abc.ABC):
|
|||
def macros(cls) -> list[str]:
|
||||
return ['%%{' + name + '}' for name in cls.macro_names]
|
||||
|
||||
def expand_macros(self, fmt: str | Iterable) -> str | list[str]:
|
||||
def expand_macros(self, fmt: str | Iterable[str]) -> str | list[str]:
|
||||
ret: str | list[str]
|
||||
if not isinstance(fmt, str):
|
||||
ret = []
|
||||
|
|
|
|||
Loading…
Reference in a new issue