Commit 38b822d0 authored by Bram Schoenmakers's avatar Bram Schoenmakers

Call super() suitable for Python 3

parent 741a47c2
......@@ -18,7 +18,7 @@ import urwid
class CommandLineWidget(urwid.Edit):
def __init__(self, *args, **kwargs):
super(CommandLineWidget, self).__init__(*args, **kwargs)
super().__init__(*args, **kwargs)
urwid.register_signal(CommandLineWidget, ['blur', 'execute_command'])
def clear(self):
......@@ -41,4 +41,4 @@ class CommandLineWidget(urwid.Edit):
try:
dispatch[p_key]()
except KeyError:
super(CommandLineWidget, self).keypress(p_size, p_key)
super().keypress(p_size, p_key)
......@@ -21,7 +21,7 @@ class ConsoleWidget(urwid.LineBox):
urwid.register_signal(ConsoleWidget, ['close'])
self.text = urwid.Text(p_text)
super(ConsoleWidget, self).__init__(self.text)
super().__init__(self.text)
def keypress(self, p_size, p_key):
if p_key == 'enter' or p_key == 'q' or p_key == 'esc':
......
......@@ -38,7 +38,7 @@ class UIView(View):
the sort expression and the filter expression, etc.)
"""
def __init__(self, p_sorter, p_filter, p_todolist, p_data):
super(UIView, self).__init__(p_sorter, p_filter, p_todolist)
super().__init__(p_sorter, p_filter, p_todolist)
self.data = p_data
_NEW_COLUMN = 1
......@@ -67,7 +67,7 @@ class MainPile(urwid.Pile):
class UIApplication(CLIApplicationBase):
def __init__(self):
super(UIApplication, self).__init__()
super().__init__()
self.todofile = TodoFile.TodoFile(config().todotxt())
self.todolist = TodoList.TodoList(self.todofile.read())
......@@ -144,7 +144,7 @@ class UIApplication(CLIApplicationBase):
pass
def _post_execute(self):
super(UIApplication, self)._post_execute()
super()._post_execute()
for column, _ in self.columns.contents:
column.update()
......
......@@ -39,7 +39,7 @@ class TodoListWidget(urwid.LineBox):
pile.focus_position = 2
super(TodoListWidget, self).__init__(pile)
super().__init__(pile)
urwid.register_signal(TodoListWidget, ['execute_command'])
......
......@@ -52,7 +52,7 @@ class TodoWidget(urwid.WidgetWrap):
self._markup(p_todo, True) # focus
)
super(TodoWidget, self).__init__(self.widget)
super().__init__(self.widget)
def _markup(self, p_todo, p_focus):
priority_colors = config().priority_colors()
......
......@@ -40,7 +40,7 @@ class ViewWidget(urwid.LineBox):
self.reset()
super(ViewWidget, self).__init__(self.pile)
super().__init__(self.pile)
urwid.register_signal(ViewWidget, ['save', 'close'])
......@@ -76,4 +76,4 @@ class ViewWidget(urwid.LineBox):
if p_key == 'esc':
self.close()
else:
return super(ViewWidget, self).keypress(p_size, p_key) # pylint: disable=E1102
return super().keypress(p_size, p_key) # pylint: disable=E1102
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment