| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent de90c37 commit 159e153
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,12 +3,12 @@ | |||
| 3 | 3 | import curtsies.events as events | |
| 4 | 4 | ||
| 5 | 5 | from ..translations import _ | |
| 6 | - from ..repl import Interaction as BpythonInteraction | ||
| 6 | + from ..repl import Interaction | ||
| 7 | 7 | from ..curtsiesfrontend.events import RefreshRequestEvent | |
| 8 | 8 | from ..curtsiesfrontend.manual_readline import edit_keys | |
| 9 | 9 | ||
| 10 | 10 | ||
| 11 | - class StatusBar(BpythonInteraction): | ||
| 11 | + class StatusBar(Interaction): | ||
| 12 | 12 | """StatusBar and Interaction for Repl | |
| 13 | 13 | ||
| 14 | 14 | Passing of control back and forth between calls that use interact api | |
@@ -157,7 +157,7 @@ def notify(self, msg, n=3, wait_for_keypress=False): | |||
| 157 | 157 | self.request_refresh() | |
| 158 | 158 | self.main_context.switch(msg) | |
| 159 | 159 | ||
| 160 | - # below Really ought to be called from greenlets other than main because | ||
| 160 | + # below really ought to be called from greenlets other than main because | ||
| 161 | 161 | # they block | |
| 162 | 162 | def confirm(self, q): | |
| 163 | 163 | """Expected to return True or False, given question prompt q""" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,7 +1,5 @@ | |||
| 1 | - import blessings | ||
| 2 | 1 | import contextlib | |
| 3 | 2 | import errno | |
| 4 | - import greenlet | ||
| 5 | 3 | import itertools | |
| 6 | 4 | import logging | |
| 7 | 5 | import os | |
@@ -13,12 +11,8 @@ | |||
| 13 | 11 | import time | |
| 14 | 12 | import unicodedata | |
| 15 | 13 | ||
| 16 | - from pygments import format as pygformat | ||
| 17 | - from pygments.lexers import Python3Lexer | ||
| 18 | - from pygments.formatters import TerminalFormatter | ||
| 19 | - | ||
| 20 | - from cwcwidth import wcswidth | ||
| 21 | - | ||
| 14 | + import blessings | ||
| 15 | + import greenlet | ||
| 22 | 16 | from curtsies import ( | |
| 23 | 17 | FSArray, | |
| 24 | 18 | fmtstr, | |
@@ -30,17 +24,10 @@ | |||
| 30 | 24 | ) | |
| 31 | 25 | from curtsies.configfile_keynames import keymap as key_dispatch | |
| 32 | 26 | from curtsies.input import is_main_thread | |
| 33 | - | ||
| 34 | - from .. import __version__, autocomplete | ||
| 35 | - from ..repl import ( | ||
| 36 | - Repl as BpythonRepl, | ||
| 37 | - SourceNotFound, | ||
| 38 | - LineTypeTranslator as LineType, | ||
| 39 | - ) | ||
| 40 | - from ..config import getpreferredencoding | ||
| 41 | - from ..formatter import BPythonFormatter | ||
| 42 | - from ..translations import _ | ||
| 43 | - from ..pager import get_pager_command | ||
| 27 | + from cwcwidth import wcswidth | ||
| 28 | + from pygments import format as pygformat | ||
| 29 | + from pygments.formatters import TerminalFormatter | ||
| 30 | + from pygments.lexers import Python3Lexer | ||
| 44 | 31 | ||
| 45 | 32 | from . import events as bpythonevents, sitefix, replpainter as paint | |
| 46 | 33 | from .coderunner import ( | |
@@ -49,14 +36,23 @@ | |||
| 49 | 36 | ) | |
| 50 | 37 | from .filewatch import ModuleChangedEventHandler | |
| 51 | 38 | from .interaction import StatusBar | |
| 52 | - from .manual_readline import edit_keys | ||
| 53 | - from .parse import parse as bpythonparse, func_for_letter, color_for_letter | ||
| 54 | - from .preprocess import preprocess | ||
| 55 | 39 | from .interpreter import ( | |
| 56 | 40 | Interp, | |
| 57 | 41 | code_finished_will_parse, | |
| 58 | 42 | ) | |
| 59 | - | ||
| 43 | + from .manual_readline import edit_keys | ||
| 44 | + from .parse import parse as bpythonparse, func_for_letter, color_for_letter | ||
| 45 | + from .preprocess import preprocess | ||
| 46 | + from .. import __version__ | ||
| 47 | + from ..config import getpreferredencoding | ||
| 48 | + from ..formatter import BPythonFormatter | ||
| 49 | + from ..pager import get_pager_command | ||
| 50 | + from ..repl import ( | ||
| 51 | + Repl, | ||
| 52 | + SourceNotFound, | ||
| 53 | + LineTypeTranslator as LineType, | ||
| 54 | + ) | ||
| 55 | + from ..translations import _ | ||
| 60 | 56 | ||
| 61 | 57 | logger = logging.getLogger(__name__) | |
| 62 | 58 | ||
@@ -271,7 +267,7 @@ def _find_module(self, fullname, path=None): | |||
| 271 | 267 | return ImportLoader(self.watcher, loader) | |
| 272 | 268 | ||
| 273 | 269 | ||
| 274 | - class BaseRepl(BpythonRepl): | ||
| 270 | + class BaseRepl(Repl): | ||
| 275 | 271 | """Python Repl | |
| 276 | 272 | ||
| 277 | 273 | Reacts to events like | |
| Back | FazBrowse Home | New Git URL |
0 commit comments