Apply PR feedback: fix type hints

This commit is contained in:
NIC619
2019-07-30 15:31:02 +08:00
parent 2d4e23cfe2
commit e53727d301
15 changed files with 65 additions and 52 deletions

View File

@ -7,6 +7,8 @@ from typing import (
from multiaddr import Multiaddr
from .peermetadata_interface import IPeerMetadata
class IPeerData(ABC):
@ -47,7 +49,7 @@ class IPeerData(ABC):
"""
@abstractmethod
def put_metadata(self, key: Any, val: Any) -> None:
def put_metadata(self, key: str, val: Any) -> None:
"""
:param key: key in KV pair
:param val: val to associate with key
@ -55,7 +57,7 @@ class IPeerData(ABC):
"""
@abstractmethod
def get_metadata(self, key: Any) -> Any:
def get_metadata(self, key: str) -> IPeerMetadata:
"""
:param key: key in KV pair
:return: val for key