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

Call super() suitable for Python 3

parent 741a47c2
...@@ -18,7 +18,7 @@ import urwid ...@@ -18,7 +18,7 @@ import urwid
class CommandLineWidget(urwid.Edit): class CommandLineWidget(urwid.Edit):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
super(CommandLineWidget, self).__init__(*args, **kwargs) super().__init__(*args, **kwargs)
urwid.register_signal(CommandLineWidget, ['blur', 'execute_command']) urwid.register_signal(CommandLineWidget, ['blur', 'execute_command'])
def clear(self): def clear(self):
...@@ -41,4 +41,4 @@ class CommandLineWidget(urwid.Edit): ...@@ -41,4 +41,4 @@ class CommandLineWidget(urwid.Edit):
try: try:
dispatch[p_key]() dispatch[p_key]()
except KeyError: except KeyError:
super(CommandLineWidget, self).keypress(p_size, p_key) super().keypress(p_size, p_key)
...@@ -21,7 +21,7 @@ class ConsoleWidget(urwid.LineBox): ...@@ -21,7 +21,7 @@ class ConsoleWidget(urwid.LineBox):
urwid.register_signal(ConsoleWidget, ['close']) urwid.register_signal(ConsoleWidget, ['close'])
self.text = urwid.Text(p_text) self.text = urwid.Text(p_text)
super(ConsoleWidget, self).__init__(self.text) super().__init__(self.text)
def keypress(self, p_size, p_key): def keypress(self, p_size, p_key):
if p_key == 'enter' or p_key == 'q' or p_key == 'esc': if p_key == 'enter' or p_key == 'q' or p_key == 'esc':
......
...@@ -38,7 +38,7 @@ class UIView(View): ...@@ -38,7 +38,7 @@ class UIView(View):
the sort expression and the filter expression, etc.) the sort expression and the filter expression, etc.)
""" """
def __init__(self, p_sorter, p_filter, p_todolist, p_data): 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 self.data = p_data
_NEW_COLUMN = 1 _NEW_COLUMN = 1
...@@ -67,7 +67,7 @@ class MainPile(urwid.Pile): ...@@ -67,7 +67,7 @@ class MainPile(urwid.Pile):
class UIApplication(CLIApplicationBase): class UIApplication(CLIApplicationBase):
def __init__(self): def __init__(self):
super(UIApplication, self).__init__() super().__init__()
self.todofile = TodoFile.TodoFile(config().todotxt()) self.todofile = TodoFile.TodoFile(config().todotxt())
self.todolist = TodoList.TodoList(self.todofile.read()) self.todolist = TodoList.TodoList(self.todofile.read())
...@@ -144,7 +144,7 @@ class UIApplication(CLIApplicationBase): ...@@ -144,7 +144,7 @@ class UIApplication(CLIApplicationBase):
pass pass
def _post_execute(self): def _post_execute(self):
super(UIApplication, self)._post_execute() super()._post_execute()
for column, _ in self.columns.contents: for column, _ in self.columns.contents:
column.update() column.update()
......
...@@ -39,7 +39,7 @@ class TodoListWidget(urwid.LineBox): ...@@ -39,7 +39,7 @@ class TodoListWidget(urwid.LineBox):
pile.focus_position = 2 pile.focus_position = 2
super(TodoListWidget, self).__init__(pile) super().__init__(pile)
urwid.register_signal(TodoListWidget, ['execute_command']) urwid.register_signal(TodoListWidget, ['execute_command'])
......
...@@ -52,7 +52,7 @@ class TodoWidget(urwid.WidgetWrap): ...@@ -52,7 +52,7 @@ class TodoWidget(urwid.WidgetWrap):
self._markup(p_todo, True) # focus self._markup(p_todo, True) # focus
) )
super(TodoWidget, self).__init__(self.widget) super().__init__(self.widget)
def _markup(self, p_todo, p_focus): def _markup(self, p_todo, p_focus):
priority_colors = config().priority_colors() priority_colors = config().priority_colors()
......
...@@ -40,7 +40,7 @@ class ViewWidget(urwid.LineBox): ...@@ -40,7 +40,7 @@ class ViewWidget(urwid.LineBox):
self.reset() self.reset()
super(ViewWidget, self).__init__(self.pile) super().__init__(self.pile)
urwid.register_signal(ViewWidget, ['save', 'close']) urwid.register_signal(ViewWidget, ['save', 'close'])
...@@ -76,4 +76,4 @@ class ViewWidget(urwid.LineBox): ...@@ -76,4 +76,4 @@ class ViewWidget(urwid.LineBox):
if p_key == 'esc': if p_key == 'esc':
self.close() self.close()
else: 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