diff --git a/stubs/paramiko/paramiko/hostkeys.pyi b/stubs/paramiko/paramiko/hostkeys.pyi index 8b7e61b54..15545bfb7 100644 --- a/stubs/paramiko/paramiko/hostkeys.pyi +++ b/stubs/paramiko/paramiko/hostkeys.pyi @@ -1,4 +1,4 @@ -from typing import Any, Dict, Iterator, List, MutableMapping, Optional +from typing import Dict, Iterator, List, Mapping, MutableMapping, Optional from paramiko.pkey import PKey @@ -12,7 +12,7 @@ class _SubDict(MutableMapping[str, PKey]): def __setitem__(self, key: str, val: PKey) -> None: ... def keys(self) -> List[str]: ... # type: ignore -class HostKeys(MutableMapping[Any, Any]): +class HostKeys(MutableMapping[str, _SubDict]): def __init__(self, filename: Optional[str] = ...) -> None: ... def add(self, hostname: str, keytype: str, key: PKey) -> None: ... def load(self, filename: str) -> None: ... @@ -24,7 +24,7 @@ class HostKeys(MutableMapping[Any, Any]): def __len__(self) -> int: ... def __getitem__(self, key: str) -> _SubDict: ... def __delitem__(self, key: str) -> None: ... - def __setitem__(self, hostname: str, entry: Dict[str, PKey]) -> None: ... + def __setitem__(self, hostname: str, entry: Mapping[str, PKey]) -> None: ... def keys(self) -> List[str]: ... # type: ignore def values(self) -> List[_SubDict]: ... # type: ignore @staticmethod