diff --git a/sopel/irc/utils.py b/sopel/irc/utils.py index f4d53a95a7..dc04733a15 100644 --- a/sopel/irc/utils.py +++ b/sopel/irc/utils.py @@ -3,7 +3,7 @@ # Licensed under the Eiffel Forum License 2. from __future__ import generator_stop -import collections +from typing import NamedTuple from dns import rdtypes, resolver @@ -104,7 +104,7 @@ def module(self): return self.plugin -class MyInfo(collections.namedtuple('MyInfo', MYINFO_ARGS)): +class MyInfo(NamedTuple): """Store client, servername, and version from ``RPL_MYINFO`` events. .. seealso:: @@ -112,5 +112,6 @@ class MyInfo(collections.namedtuple('MyInfo', MYINFO_ARGS)): https://modern.ircdocs.horse/#rplmyinfo-004 """ - # TODO: replace by a class using typing.NamedTuple (new in Python 3.5+) - # probably in Sopel 8.0 (due to drop most old Python versions) + client: str + servername: str + version: str