From 448d9771f8a5d1d629ec02c13b4b35cdaf2d1313 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sun, 2 Jul 2023 10:17:35 +0200 Subject: [PATCH] Correctly document meaning of None vs absent values in nicksToAccounts --- src/irclib.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/irclib.py b/src/irclib.py index a6932590b..a0d7f4076 100644 --- a/src/irclib.py +++ b/src/irclib.py @@ -684,9 +684,10 @@ class IrcState(IrcCommandDispatcher, log.Firewalled): .. attribute:: nicksToAccounts - Stores the current services account name of a seen nick. + Stores the current services account name of a seen nick (or + :const:`None` for un-identified nicks) - :type: ircutils.IrcDict[str, str] + :type: ircutils.IrcDict[str, Optional[str]] """ __firewalled__ = {'addMsg': None} @@ -807,7 +808,8 @@ class IrcState(IrcCommandDispatcher, log.Firewalled): def nickToAccount(self, nick): """Returns the account for a given nick, or None if the nick is logged - out.""" + out. Raises :exc:`KeyError` if the nick was not seen or its account is + not known yet.""" return self.nicksToAccounts[nick] def getParentBatches(self, msg):