Change to use super() instead of the old py2 style everywhere

This commit is contained in:
Griatch 2022-01-26 21:45:28 +01:00
parent 55237f20a7
commit 5859de7054
33 changed files with 69 additions and 70 deletions

View file

@ -26,7 +26,7 @@ that will edit any default object, offering to change its key and description.
key = "DefaultCharacter"
def at_cmdset_creation(self):
super(CharacterCmdSet, self).at_cmdset_creation()
super().at_cmdset_creation()
# ... add the line below
self.add(GenericBuildingCmd())
```

View file

@ -26,7 +26,7 @@ that will edit any default object offering to change its key and description.
key = "DefaultCharacter"
def at_cmdset_creation(self):
super(CharacterCmdSet, self).at_cmdset_creation()
super().at_cmdset_creation()
# ... add the line below
self.add(GenericBuildingCmd())
```
@ -338,7 +338,7 @@ class CmdNoInput(Command):
def __init__(self, **kwargs):
self.menu = kwargs.pop("building_menu", None)
super(Command, self).__init__(**kwargs)
super().__init__(**kwargs)
def func(self):
"""Display the menu or choice text."""
@ -359,7 +359,7 @@ class CmdNoMatch(Command):
def __init__(self, **kwargs):
self.menu = kwargs.pop("building_menu", None)
super(Command, self).__init__(**kwargs)
super().__init__(**kwargs)
def func(self):
"""Call the proper menu or redirect to nomatch."""

View file

@ -14,7 +14,7 @@ class Submenu(BuildingMenu):
class TestBuildingMenu(BaseEvenniaCommandTest):
def setUp(self):
super(TestBuildingMenu, self).setUp()
super().setUp()
self.menu = BuildingMenu(caller=self.char1, obj=self.room1, title="test")
self.menu.add_choice("title", key="t", attr="key")

View file

@ -208,7 +208,7 @@ class CharacterCmdSet(default_cmds.CharacterCmdSet):
"""
Populates the cmdset
"""
super(CharacterCmdSet, self).at_cmdset_creation()
super().at_cmdset_creation()
self.add(CmdCallback())
```