Style fixes.

This commit is contained in:
Paul Tagliamonte 2013-07-04 21:31:17 -04:00
parent 2e909d5357
commit 56ccdf97e3
3 changed files with 9 additions and 8 deletions

View File

@ -24,27 +24,26 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
import ast
import code
import optparse
import os
import code
import ast
import sys
import hy
from hy.importer import ast_compile, import_buffer_to_module
from hy.lex.states import Idle, LexException
from hy.lex.machine import Machine
from hy.compiler import hy_compile
from hy.core import process
from hy.importer import ast_compile, import_buffer_to_module
import hy.completer
from hy.readline_helpers import read_history_file, write_history_file
import hy.completer
from hy.macros import macro, require
from hy.models.expression import HyExpression
from hy.models.string import HyString
from hy.models.symbol import HySymbol
from hy.macros import macro, require
_machine = Machine(Idle, 1, 0)

View File

@ -59,4 +59,3 @@ class Completer(object):
return None
set_completer(Completer().complete, "()[]{} ")

View File

@ -35,16 +35,18 @@ try:
except ImportError:
try:
import pyreadline.rlmain
import pyreadline.unicode_helper
import pyreadline.unicode_helper # NOQA
import readline
except ImportError:
noop = True
def set_completer(completer, delims):
if not noop:
readline.set_completer(completer)
readline.set_completer_delims(delims)
def read_history_file():
if noop:
return None
@ -60,6 +62,7 @@ def read_history_file():
readline.parse_and_bind("tab: complete")
return history
def write_history_file(history):
if not noop:
readline.write_history_file(history)