develop: use new super() syntax to call parent constructors

This commit is contained in:
James Lu
2023-04-30 11:37:26 -07:00
parent b775986c38
commit 8e0582c325
3 changed files with 5 additions and 9 deletions

View File

@ -463,8 +463,7 @@ when `supybot.nick` is edited. You can do it like this::
"""Some useless plugin."""
def __init__(self, irc):
self.__parent = super(LogNickChange, self)
self.__parent.__init__(irc)
super().__init__(irc)
conf.supybot.nick.addCallback(self._configCallback)
def _configCallback(self, name=None):
@ -477,8 +476,7 @@ show a warning instead of crashing on those versions::
"""Some useless plugin."""
def __init__(self, irc):
self.__parent = super(LogNickChange, self)
self.__parent.__init__(irc)
super().__init__(irc)
try:
conf.supybot.nick.addCallback(self._configCallback)
except registry.NonExistentRegistryEntry: