Style fixes.
This commit is contained in:
parent
2e909d5357
commit
56ccdf97e3
@ -24,27 +24,26 @@
|
|||||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
# DEALINGS IN THE SOFTWARE.
|
# DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
import ast
|
|
||||||
import code
|
|
||||||
import optparse
|
import optparse
|
||||||
import os
|
import code
|
||||||
|
import ast
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import hy
|
import hy
|
||||||
|
|
||||||
|
from hy.importer import ast_compile, import_buffer_to_module
|
||||||
from hy.lex.states import Idle, LexException
|
from hy.lex.states import Idle, LexException
|
||||||
from hy.lex.machine import Machine
|
from hy.lex.machine import Machine
|
||||||
from hy.compiler import hy_compile
|
from hy.compiler import hy_compile
|
||||||
from hy.core import process
|
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
|
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.expression import HyExpression
|
||||||
from hy.models.string import HyString
|
from hy.models.string import HyString
|
||||||
from hy.models.symbol import HySymbol
|
from hy.models.symbol import HySymbol
|
||||||
|
from hy.macros import macro, require
|
||||||
|
|
||||||
_machine = Machine(Idle, 1, 0)
|
_machine = Machine(Idle, 1, 0)
|
||||||
|
|
||||||
|
@ -59,4 +59,3 @@ class Completer(object):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
set_completer(Completer().complete, "()[]{} ")
|
set_completer(Completer().complete, "()[]{} ")
|
||||||
|
|
||||||
|
@ -35,16 +35,18 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
try:
|
try:
|
||||||
import pyreadline.rlmain
|
import pyreadline.rlmain
|
||||||
import pyreadline.unicode_helper
|
import pyreadline.unicode_helper # NOQA
|
||||||
import readline
|
import readline
|
||||||
except ImportError:
|
except ImportError:
|
||||||
noop = True
|
noop = True
|
||||||
|
|
||||||
|
|
||||||
def set_completer(completer, delims):
|
def set_completer(completer, delims):
|
||||||
if not noop:
|
if not noop:
|
||||||
readline.set_completer(completer)
|
readline.set_completer(completer)
|
||||||
readline.set_completer_delims(delims)
|
readline.set_completer_delims(delims)
|
||||||
|
|
||||||
|
|
||||||
def read_history_file():
|
def read_history_file():
|
||||||
if noop:
|
if noop:
|
||||||
return None
|
return None
|
||||||
@ -60,6 +62,7 @@ def read_history_file():
|
|||||||
readline.parse_and_bind("tab: complete")
|
readline.parse_and_bind("tab: complete")
|
||||||
return history
|
return history
|
||||||
|
|
||||||
|
|
||||||
def write_history_file(history):
|
def write_history_file(history):
|
||||||
if not noop:
|
if not noop:
|
||||||
readline.write_history_file(history)
|
readline.write_history_file(history)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user