Skip to content

Commit 447bede

Browse files
committed
Use relative imports
1 parent cb05a2d commit 447bede

File tree

8 files changed

+18
-19
lines changed

8 files changed

+18
-19
lines changed

bpython/curtsiesfrontend/_internal.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# THE SOFTWARE.
2222

2323
import pydoc
24-
import bpython._internal
24+
from .. import _internal
2525

2626

2727
class NopPydocPager:
@@ -36,7 +36,7 @@ def __call__(self, text):
3636
return None
3737

3838

39-
class _Helper(bpython._internal._Helper):
39+
class _Helper(_internal._Helper):
4040
def __init__(self, repl=None):
4141
self._repl = repl
4242
pydoc.pager = self.pager

bpython/curtsiesfrontend/filewatch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import os
22
from collections import defaultdict
33

4-
from bpython import importcompletion
4+
from .. import importcompletion
55

66
try:
77
from watchdog.observers import Observer

bpython/curtsiesfrontend/interaction.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
import time
33
import curtsies.events as events
44

5-
from bpython.translations import _
6-
from bpython.repl import Interaction as BpythonInteraction
7-
from bpython.curtsiesfrontend.events import RefreshRequestEvent
8-
from bpython.curtsiesfrontend.manual_readline import edit_keys
5+
from ..translations import _
6+
from ..repl import Interaction as BpythonInteraction
7+
from ..curtsiesfrontend.events import RefreshRequestEvent
8+
from ..curtsiesfrontend.manual_readline import edit_keys
99

1010

1111
class StatusBar(BpythonInteraction):

bpython/curtsiesfrontend/interpreter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
from pygments.formatter import Formatter
77
from pygments.lexers import get_lexer_by_name
88

9-
from bpython.curtsiesfrontend.parse import parse
10-
from bpython.repl import Interpreter as ReplInterpreter
9+
from ..curtsiesfrontend.parse import parse
10+
from ..repl import Interpreter as ReplInterpreter
1111

1212

1313
default_colors = {

bpython/curtsiesfrontend/manual_readline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
and the cursor location
55
based on http://www.bigsmoke.us/readline/shortcuts"""
66

7-
from bpython.lazyre import LazyReCompile
7+
from ..lazyre import LazyReCompile
88

99
import inspect
1010

bpython/curtsiesfrontend/parse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
)
99
from functools import partial
1010

11-
from bpython.lazyre import LazyReCompile
11+
from ..lazyre import LazyReCompile
1212

1313

1414
COLORS = CURTSIES_COLORS + ("default",)

bpython/curtsiesfrontend/repl.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,16 @@
3131
from curtsies.configfile_keynames import keymap as key_dispatch
3232
from curtsies.input import is_main_thread
3333

34-
from bpython import __version__
35-
from bpython.repl import (
34+
from .. import __version__, autocomplete
35+
from ..repl import (
3636
Repl as BpythonRepl,
3737
SourceNotFound,
3838
LineTypeTranslator as LineType,
3939
)
40-
from bpython.config import getpreferredencoding
41-
from bpython.formatter import BPythonFormatter
42-
from bpython import autocomplete
43-
from bpython.translations import _
44-
from bpython.pager import get_pager_command
40+
from ..config import getpreferredencoding
41+
from ..formatter import BPythonFormatter
42+
from ..translations import _
43+
from ..pager import get_pager_command
4544

4645
from . import events as bpythonevents, sitefix, replpainter as paint
4746
from .coderunner import (

bpython/curtsiesfrontend/replpainter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from curtsies.formatstring import linesplit
66
from curtsies.fmtfuncs import bold
77

8-
from bpython.curtsiesfrontend.parse import func_for_letter
8+
from .parse import func_for_letter
99

1010
logger = logging.getLogger(__name__)
1111

0 commit comments

Comments
 (0)