style cleanup
This commit is contained in:
parent
a1cf9e50eb
commit
ada946fca8
@ -534,8 +534,8 @@ class HyASTCompiler(object):
|
||||
|
||||
@builds("global")
|
||||
@checkargs(1)
|
||||
def compile_global_expression(self,expr):
|
||||
expr.pop(0) # global
|
||||
def compile_global_expression(self, expr):
|
||||
expr.pop(0) # global
|
||||
e = expr.pop(0)
|
||||
return ast.Global(names=[ast_str(e)],
|
||||
lineno=e.start_line,
|
||||
|
@ -185,15 +185,18 @@ def test_ast_bad_assert():
|
||||
cant_compile("(assert)")
|
||||
cant_compile("(assert 1 2)")
|
||||
|
||||
|
||||
def test_ast_good_global():
|
||||
"Make sure AST can compile valid global"
|
||||
hy_compile(tokenize("(global a)"))
|
||||
|
||||
|
||||
def test_ast_bad_global():
|
||||
"Make sure AST can't compile invalid global"
|
||||
cant_compile("(global)")
|
||||
cant_compile("(global foo bar)")
|
||||
|
||||
|
||||
def test_ast_good_lambda():
|
||||
"Make sure AST can compile valid lambda"
|
||||
hy_compile(tokenize("(lambda [] 1)"))
|
||||
|
Loading…
Reference in New Issue
Block a user