Skip to content

Commit 65508f4

Browse files
committed
Cleanup imports.
1 parent c553e35 commit 65508f4

File tree

4 files changed

+3
-9
lines changed

4 files changed

+3
-9
lines changed

bpython/cli.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import math
3131
import re
3232
import time
33-
import inspect
3433
import signal
3534
import struct
3635
import termios
@@ -49,7 +48,6 @@
4948
from bpython.formatter import BPythonFormatter
5049

5150
# This for completion
52-
from bpython import inspection
5351
from bpython import importcompletion
5452

5553
# This for config

bpython/gtk_.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@
3333
import os
3434
import sys
3535
from locale import LC_ALL, getpreferredencoding, setlocale
36-
from xmlrpclib import ServerProxy, Error as XMLRPCError
37-
from string import Template
38-
from urllib import quote as urlquote
3936

4037
import gobject
4138
import gtk

bpython/inspection.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
except AttributeError:
4040
has_collections_callable = False
4141
try:
42-
import types
4342
types.InstanceType
4443
has_instance_type = True
4544
except AttributeError:

bpython/urwid.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ def reevaluate(self):
617617
if py3:
618618
self.stdout_hist += line + '\n'
619619
else:
620-
self.stdout_hist += line.encode(getpreferredencoding()) + '\n'
620+
self.stdout_hist += line.encode(locale.getpreferredencoding()) + '\n'
621621
self.print_line(line)
622622
self.s_hist[-1] += self.f_string
623623
# I decided it was easier to just do this manually
@@ -628,7 +628,7 @@ def reevaluate(self):
628628
self.iy, self.ix = self.scr.getyx()
629629

630630
self.cpos = 0
631-
indent = next_indentation(self.s, self.config.tab_length)
631+
indent = repl.next_indentation(self.s, self.config.tab_length)
632632
self.s = ''
633633
self.scr.refresh()
634634

@@ -652,7 +652,7 @@ def write(self, s):
652652
t = s
653653

654654
if not py3 and isinstance(t, unicode):
655-
t = t.encode(getpreferredencoding())
655+
t = t.encode(locale.getpreferredencoding())
656656

657657
if not self.stdout_hist:
658658
self.stdout_hist = t

0 commit comments

Comments
 (0)