aboutsummaryrefslogtreecommitdiff
path: root/src/IRCBuffer.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-10-31 15:12:46 +0000
committerGravatar jesopo2018-10-31 15:12:46 +0000
commita4d8d1f85557ced37ab41038e9fbd25d6332eebf (patch)
treeee2886a839a32ac54cd64a0447044af6a19f7d08 /src/IRCBuffer.py
parentMove setting BitBotFormatter's converter (to time.gmtime) to class definition as (diff)
Fix some non-explicit None returns, add type hints to important variables
Diffstat (limited to 'src/IRCBuffer.py')
-rw-r--r--src/IRCBuffer.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/IRCBuffer.py b/src/IRCBuffer.py
index 426e15e9..4f4b381a 100644
--- a/src/IRCBuffer.py
+++ b/src/IRCBuffer.py
@@ -40,6 +40,7 @@ class Buffer(object):
if line.from_self and not from_self:
continue
return line
+ return None
def find(self, pattern: typing.Union[str, typing.Pattern[str]], **kwargs
) -> typing.Optional[BufferLine]:
from_self = kwargs.get("from_self", True)
@@ -57,5 +58,6 @@ class Buffer(object):
line.sender) == for_user:
continue
return line
+ return None
def skip_next(self):
self._skip_next = True