diff options
| author | 2018-12-02 09:56:57 +0000 | |
|---|---|---|
| committer | 2018-12-02 09:56:57 +0000 | |
| commit | 08bd31f150a6d3a4f74299008596ca438ed8459d (patch) | |
| tree | 70928829caff8c2c17e9ff70d0cfe4e54b4efbee /src/utils | |
| parent | `data` is now `line` (diff) | |
| signature | ||
A couple of tweaks to clarify some type hints
Diffstat (limited to 'src/utils')
| -rw-r--r-- | src/utils/irc.py | 6 |
1 files changed, 2 insertions, 4 deletions
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) |
