From 08bd31f150a6d3a4f74299008596ca438ed8459d Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 2 Dec 2018 09:56:57 +0000 Subject: A couple of tweaks to clarify some type hints --- src/utils/irc.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/utils/irc.py') diff --git a/src/utils/irc.py b/src/utils/irc.py index 0e0921df..56c030b2 100644 --- a/src/utils/irc.py +++ b/src/utils/irc.py @@ -80,7 +80,7 @@ def message_tag_unescape(s): return _multi_replace(s, MESSAGE_TAG_ESCAPED, MESSAGE_TAG_UNESCAPED) def parse_line(line: str) -> IRCLine: - tags = {} + tags = {} # type: typing.Dict[str, typing.Any] prefix = None # type: typing.Optional[IRCHostmask] command = None @@ -108,10 +108,8 @@ def parse_line(line: str) -> IRCLine: prefix_str, line = line[1:].split(" ", 1) prefix = seperate_hostmask(prefix_str) - args = [] command, sep, line = line.partition(" ") - if sep: - args = line.split(" ") + args = line.split(" ") if arbitrary: args.append(arbitrary) -- cgit v1.3.1-10-gc9f91