Moving to astor.codegen
This commit is contained in:
parent
cdffc9d9d1
commit
10b887bbc8
@ -2,7 +2,7 @@
|
||||
|
||||
from hy.importer import (import_file_to_ast, import_file_to_module,
|
||||
import_file_to_hst)
|
||||
import codegen
|
||||
import astor.codegen
|
||||
import sys
|
||||
import ast
|
||||
|
||||
@ -17,6 +17,6 @@ print ""
|
||||
print ast.dump(_ast)
|
||||
print ""
|
||||
print ""
|
||||
print codegen.to_source(_ast)
|
||||
print astor.codegen.to_source(_ast)
|
||||
|
||||
import_file_to_module("<STDIN>", sys.argv[1])
|
||||
|
@ -1,5 +1,5 @@
|
||||
tox
|
||||
nose
|
||||
astor
|
||||
flake8
|
||||
codegen
|
||||
coverage
|
||||
|
@ -1,4 +1,4 @@
|
||||
flask
|
||||
astor
|
||||
pygments
|
||||
codegen
|
||||
autopep8
|
||||
|
@ -11,7 +11,7 @@
|
||||
(import-from hy.importer import_string_to_ast)
|
||||
|
||||
(import autopep8)
|
||||
(import codegen)
|
||||
(import astor.codegen)
|
||||
|
||||
|
||||
(def app (Flask "__main__")) ; long story, needed hack
|
||||
@ -19,7 +19,8 @@
|
||||
|
||||
|
||||
(defn hy-to-py [hython]
|
||||
(.fix-string autopep8 (.to_source codegen (import-string-to-ast hython))))
|
||||
(.fix-string autopep8
|
||||
(.to_source astor.codegen (import-string-to-ast hython))))
|
||||
|
||||
(defn err [msg] (make-response msg 500))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user