From 56ccdf97e3ac0185101ce78b4897eb4a1cc9f7ac Mon Sep 17 00:00:00 2001 From: Paul Tagliamonte Date: Thu, 4 Jul 2013 21:31:17 -0400 Subject: [PATCH] Style fixes. --- hy/cmdline.py | 11 +++++------ hy/completer.py | 1 - hy/readline_helpers.py | 5 ++++- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/hy/cmdline.py b/hy/cmdline.py index 2ea7ec7..b3dfe10 100644 --- a/hy/cmdline.py +++ b/hy/cmdline.py @@ -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) diff --git a/hy/completer.py b/hy/completer.py index f88a880..be75cd2 100644 --- a/hy/completer.py +++ b/hy/completer.py @@ -59,4 +59,3 @@ class Completer(object): return None set_completer(Completer().complete, "()[]{} ") - diff --git a/hy/readline_helpers.py b/hy/readline_helpers.py index 3818b4d..dfa03e9 100644 --- a/hy/readline_helpers.py +++ b/hy/readline_helpers.py @@ -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)