| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d711735 commit d9402cd
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -307,7 +307,7 @@ def make_colors(config): | |||
| 307 | 307 | ||
| 308 | 308 | class CLIInteraction(repl.Interaction): | |
| 309 | 309 | def __init__(self, config, statusbar=None): | |
| 310 | - repl.Interaction.__init__(self, config, statusbar) | ||
| 310 | + super(CLIInteraction, self).__init__(config, statusbar) | ||
| 311 | 311 | ||
| 312 | 312 | def confirm(self, q): | |
| 313 | 313 | """Ask for yes or no and return boolean""" | |
@@ -328,7 +328,7 @@ def file_prompt(self, s): | |||
| 328 | 328 | class CLIRepl(repl.Repl): | |
| 329 | 329 | ||
| 330 | 330 | def __init__(self, scr, interp, statusbar, config, idle=None): | |
| 331 | - repl.Repl.__init__(self, interp, config) | ||
| 331 | + super(CLIRepl, self).__init__(interp, config) | ||
| 332 | 332 | self.interp.writetb = self.writetb | |
| 333 | 333 | self.scr = scr | |
| 334 | 334 | self.stdout_hist = '' # native str (bytes in Py2, unicode in Py3) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -27,7 +27,7 @@ class ScheduledRefreshRequestEvent(curtsies.events.ScheduledEvent): | |||
| 27 | 27 | Used to schedule the disappearance of status bar message that only shows | |
| 28 | 28 | for a few seconds""" | |
| 29 | 29 | def __init__(self, when): | |
| 30 | - self.when = when # time.time() + how long | ||
| 30 | + super(ScheduledRefreshRequestEvent, self).__init__(when) | ||
| 31 | 31 | ||
| 32 | 32 | def __repr__(self): | |
| 33 | 33 | return ("<RefreshRequestEvent for %s seconds from now>" % | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -27,6 +27,7 @@ class StatusBar(BpythonInteraction): | |||
| 27 | 27 | bpython.Repl code. | |
| 28 | 28 | """ | |
| 29 | 29 | def __init__(self, | |
| 30 | + config, | ||
| 30 | 31 | permanent_text="", | |
| 31 | 32 | request_refresh=lambda: None, | |
| 32 | 33 | schedule_refresh=lambda when: None): | |
@@ -47,6 +48,8 @@ def __init__(self, | |||
| 47 | 48 | self.request_refresh = request_refresh | |
| 48 | 49 | self.schedule_refresh = schedule_refresh | |
| 49 | 50 | ||
| 51 | + super(StatusBar, self).__init__(config) | ||
| 52 | + | ||
| 50 | 53 | def push_permanent_message(self, msg): | |
| 51 | 54 | self._message = '' | |
| 52 | 55 | self.permanent_stack.append(msg) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -348,7 +348,7 @@ def __init__(self, | |||
| 348 | 348 | self.reevaluating = False | |
| 349 | 349 | self.fake_refresh_requested = False | |
| 350 | 350 | ||
| 351 | - self.status_bar = StatusBar('', | ||
| 351 | + self.status_bar = StatusBar(config, '', | ||
| 352 | 352 | request_refresh=self.request_refresh, | |
| 353 | 353 | schedule_refresh=self.schedule_refresh) | |
| 354 | 354 | self.edit_keys = edit_keys.mapping_with_config(config, key_dispatch) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments