X Tutup
Skip to content

Commit 13092bc

Browse files
committed
Use six.moves.range and six.moves.builtins
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
1 parent 0fe93e5 commit 13092bc

File tree

7 files changed

+9
-5
lines changed

7 files changed

+9
-5
lines changed

bpython/autocomplete.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import keyword
2727
import os
2828
import rlcompleter
29+
from six.moves import range, builtins
2930

3031
from glob import glob
3132

@@ -35,11 +36,6 @@
3536
from bpython._py3compat import py3
3637
from bpython.lazyre import LazyReCompile
3738

38-
try:
39-
import builtins
40-
except ImportError:
41-
import __builtin__ as builtins
42-
4339

4440
# Autocomplete modes
4541
SIMPLE = 'simple'

bpython/cli.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060

6161
import locale
6262
from types import ModuleType
63+
from six.moves import range
6364

6465
# These are used for syntax highlighting
6566
from pygments import format

bpython/curtsiesfrontend/repl.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
import contextlib
23
import errno
34
import functools
@@ -12,6 +13,7 @@
1213
import threading
1314
import time
1415
import unicodedata
16+
from six.moves import range
1517

1618
from pygments import format
1719
from bpython._py3compat import PythonLexer

bpython/curtsiesfrontend/replpainter.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import logging
44
import itertools
5+
from six.moves import range
56

67
from curtsies import fsarray, fmtstr
78
from curtsies.formatstring import linesplit

bpython/history.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import codecs
2525
import os
2626
from itertools import islice
27+
from six.moves import range
2728

2829
from bpython.translations import _
2930
from bpython.filelock import FileLock

bpython/keys.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#
2323

2424
import string
25+
from six.moves import range
2526

2627

2728
class KeyMap:
@@ -46,6 +47,7 @@ def __delitem__(self, key):
4647
def __setitem__(self, key, value):
4748
self.map[key] = value
4849

50+
4951
cli_key_dispatch = KeyMap(tuple())
5052
urwid_key_dispatch = KeyMap('')
5153

bpython/urwid.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
import signal
4343
from types import ModuleType
4444
from optparse import Option
45+
from six.moves import range
4546

4647
from pygments.token import Token
4748

0 commit comments

Comments
 (0)
X Tutup