get rid of Any in paramiko HostKeys (#5342)

This commit is contained in:
Akuli
2021-05-05 13:35:44 +03:00
committed by GitHub
parent a5e243fbcd
commit 8379386bd4

View File

@@ -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