mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
get rid of Any in paramiko HostKeys (#5342)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user