aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar jesopo2018-11-20 17:23:14 +0000
committerGravatar jesopo2018-11-20 17:23:47 +0000
commit60acf02cee94b314508d33f4915cd43c7262aa91 (patch)
treedb02233c926122b4bbae13643370443051cfb565
parentAdd !disconnect to admin.py (diff)
signature
`prefix` should be a Optional[IRCHostmask], we shouldn't use `Optional[]` as a
compile-time object (utils.irc)
-rw-r--r--src/utils/irc.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/utils/irc.py b/src/utils/irc.py
index df670c53..f04abafc 100644
--- a/src/utils/irc.py
+++ b/src/utils/irc.py
@@ -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] == "@":