Add type hints to utils.irc.MessageTag

This commit is contained in:
jesopo 2019-05-14 23:07:42 +01:00
parent 421d9c10c7
commit 38ba656bda

View file

@ -296,8 +296,8 @@ class Capability(object):
def nak(self): def nak(self):
pass pass
def MessageTag(object): class MessageTag(object):
def __init__(self, name, draft_name=None): def __init__(self, name: str, draft_name: str=None):
self._names = set([name, draft_name]) self._names = set([name, draft_name])
def get_value(self, tags: typing.Dict[str, str]) -> typing.Optional[str]: def get_value(self, tags: typing.Dict[str, str]) -> typing.Optional[str]:
key = list(set(tags.keys())&self._names) key = list(set(tags.keys())&self._names)