Merge pull request #765 from zackmdavis/appease_flake8
move imports and operators to satisfy new version of pep8 checker
This commit is contained in:
commit
49e7376b0e
@ -692,8 +692,9 @@ class HyASTCompiler(object):
|
||||
expr.pop(0)
|
||||
|
||||
ret = self.compile(HyExpression(
|
||||
[HySymbol("hy_eval")] + expr + [HyExpression([HySymbol("locals")])]
|
||||
+ [HyString(self.module_name)]).replace(expr)
|
||||
[HySymbol("hy_eval")] + expr +
|
||||
[HyExpression([HySymbol("locals")])] +
|
||||
[HyString(self.module_name)]).replace(expr)
|
||||
)
|
||||
|
||||
ret.add_imports("hy.importer", ["hy_eval"])
|
||||
|
@ -25,11 +25,15 @@
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
# DEALINGS IN THE SOFTWARE.
|
||||
|
||||
import contextlib
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
from contextlib import contextmanager
|
||||
from hy._compat import string_types
|
||||
|
||||
import hy.macros
|
||||
import hy.compiler
|
||||
from hy._compat import builtins, string_types
|
||||
|
||||
|
||||
docomplete = True
|
||||
|
||||
@ -49,12 +53,6 @@ else:
|
||||
readline_bind = "tab: complete"
|
||||
|
||||
|
||||
import hy.macros
|
||||
import hy.compiler
|
||||
|
||||
from hy._compat import builtins
|
||||
|
||||
|
||||
class Completer(object):
|
||||
|
||||
def __init__(self, namespace={}):
|
||||
@ -129,7 +127,7 @@ class Completer(object):
|
||||
return None
|
||||
|
||||
|
||||
@contextmanager
|
||||
@contextlib.contextmanager
|
||||
def completion(completer=None):
|
||||
delims = "()[]{} "
|
||||
if not completer:
|
||||
|
@ -22,16 +22,16 @@
|
||||
import ast
|
||||
import sys
|
||||
|
||||
if sys.version_info[0] <= 2 and sys.version_info[1] <= 6:
|
||||
import unittest2 as unittest
|
||||
else:
|
||||
import unittest
|
||||
|
||||
from hy import compiler
|
||||
from hy.models.expression import HyExpression
|
||||
from hy.models.list import HyList
|
||||
from hy.models.symbol import HySymbol
|
||||
|
||||
if sys.version_info[0] <= 2 and sys.version_info[1] <= 6:
|
||||
import unittest2 as unittest
|
||||
else:
|
||||
import unittest
|
||||
|
||||
|
||||
class CompilerTest(unittest.TestCase):
|
||||
|
||||
|
@ -136,8 +136,7 @@ def test_hy2py():
|
||||
continue
|
||||
else:
|
||||
i += 1
|
||||
ret = run_cmd("hy2py -s -a "
|
||||
+ os.path.join(dirpath, f))
|
||||
ret = run_cmd("hy2py -s -a " + os.path.join(dirpath, f))
|
||||
assert ret[0] == 0, f
|
||||
assert len(ret[1]) > 1, f
|
||||
assert len(ret[2]) == 0, f
|
||||
|
Loading…
Reference in New Issue
Block a user