prefix should be a Optional[IRCHostmask], we shouldn't use Optional[] as a

compile-time object (utils.irc)
This commit is contained in:
jesopo 2018-11-20 17:23:14 +00:00
parent 45c7ce6da5
commit 60acf02cee

View file

@ -64,8 +64,8 @@ class IRCArgs(object):
class IRCLine(object):
def __init__(self, tags: dict, prefix: typing.Optional[str], command: str,
args: IRCArgs, has_arbitrary: bool):
def __init__(self, tags: dict, prefix: typing.Optional[IRCHostmask],
command: str, args: IRCArgs, has_arbitrary: bool):
self.tags = tags
self.prefix = prefix
self.command = command
@ -81,7 +81,7 @@ def message_tag_unescape(s):
def parse_line(line: str) -> IRCLine:
tags = {}
prefix = typing.Optional[IRCHostmask]
prefix = None # type: typing.Optional[IRCHostmask]
command = None
if line[0] == "@":