Skip to content

Commit d9402cd

Browse files
committed
Call base's __init__
1 parent d711735 commit d9402cd

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

bpython/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def make_colors(config):
307307

308308
class CLIInteraction(repl.Interaction):
309309
def __init__(self, config, statusbar=None):
310-
repl.Interaction.__init__(self, config, statusbar)
310+
super(CLIInteraction, self).__init__(config, statusbar)
311311

312312
def confirm(self, q):
313313
"""Ask for yes or no and return boolean"""
@@ -328,7 +328,7 @@ def file_prompt(self, s):
328328
class CLIRepl(repl.Repl):
329329

330330
def __init__(self, scr, interp, statusbar, config, idle=None):
331-
repl.Repl.__init__(self, interp, config)
331+
super(CLIRepl, self).__init__(interp, config)
332332
self.interp.writetb = self.writetb
333333
self.scr = scr
334334
self.stdout_hist = '' # native str (bytes in Py2, unicode in Py3)

bpython/curtsiesfrontend/events.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class ScheduledRefreshRequestEvent(curtsies.events.ScheduledEvent):
2727
Used to schedule the disappearance of status bar message that only shows
2828
for a few seconds"""
2929
def __init__(self, when):
30-
self.when = when # time.time() + how long
30+
super(ScheduledRefreshRequestEvent, self).__init__(when)
3131

3232
def __repr__(self):
3333
return ("<RefreshRequestEvent for %s seconds from now>" %

bpython/curtsiesfrontend/interaction.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class StatusBar(BpythonInteraction):
2727
bpython.Repl code.
2828
"""
2929
def __init__(self,
30+
config,
3031
permanent_text="",
3132
request_refresh=lambda: None,
3233
schedule_refresh=lambda when: None):
@@ -47,6 +48,8 @@ def __init__(self,
4748
self.request_refresh = request_refresh
4849
self.schedule_refresh = schedule_refresh
4950

51+
super(StatusBar, self).__init__(config)
52+
5053
def push_permanent_message(self, msg):
5154
self._message = ''
5255
self.permanent_stack.append(msg)

bpython/curtsiesfrontend/repl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ def __init__(self,
348348
self.reevaluating = False
349349
self.fake_refresh_requested = False
350350

351-
self.status_bar = StatusBar('',
351+
self.status_bar = StatusBar(config, '',
352352
request_refresh=self.request_refresh,
353353
schedule_refresh=self.schedule_refresh)
354354
self.edit_keys = edit_keys.mapping_with_config(config, key_dispatch)

0 commit comments

Comments
 (0)