From fbf8cd1a167966d31717f4fc1fec1418910ad0f4 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sat, 26 Oct 2019 00:32:00 +0200 Subject: Fix type errors detected by 'mypy --ignore-missing-imports src'. --- src/IRCLine.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/IRCLine.py') diff --git a/src/IRCLine.py b/src/IRCLine.py index 75c88215..269e1dc0 100644 --- a/src/IRCLine.py +++ b/src/IRCLine.py @@ -1,5 +1,5 @@ import datetime, typing, uuid -from src import IRCObject, utils +from src import EventManager, IRCObject, utils # this should be 510 (RFC1459, 512 with \r\n) but a server BitBot uses is broken LINE_MAX = 470 @@ -130,7 +130,7 @@ class ParsedLine(object): def _newline_truncate(self, line: str) -> typing.Tuple[str, str]: line, sep, overflow = line.partition("\n") - return [line, overflow] + return (line, overflow) def _line_max(self, hostmask: str, margin: int) -> int: return LINE_MAX-len((":%s " % hostmask).encode("utf8"))-margin def truncate(self, hostmask: str, margin: int=0) -> typing.Tuple[str, str]: -- cgit v1.3.1-10-gc9f91