diff --git a/python/taichi/lang/kernel.py b/python/taichi/lang/kernel.py index 3b9cefe565e3c8..8c195db1ba5878 100644 --- a/python/taichi/lang/kernel.py +++ b/python/taichi/lang/kernel.py @@ -50,7 +50,7 @@ def do_compile(self): func_body = tree.body[0] func_body.decorator_list = [] - if get_runtime().print_preprocessed or 1: + if get_runtime().print_preprocessed: import astor print('Before preprocessing:') print(astor.to_source(tree.body[0], indent_with=' ')) @@ -59,7 +59,7 @@ def do_compile(self): visitor.visit(tree) ast.fix_missing_locations(tree) - if get_runtime().print_preprocessed or 1: + if get_runtime().print_preprocessed: import astor print('After preprocessing:') print(astor.to_source(tree.body[0], indent_with=' ')) @@ -213,7 +213,7 @@ def materialize(self, key=None, args=None, arg_features=None): src = remove_indent(inspect.getsource(self.func)) tree = ast.parse(src) - if self.runtime.print_preprocessed or 1: + if self.runtime.print_preprocessed: import astor print('Before preprocessing:') print(astor.to_source(tree.body[0])) @@ -239,7 +239,7 @@ def materialize(self, key=None, args=None, arg_features=None): visitor.visit(tree) ast.fix_missing_locations(tree) - if self.runtime.print_preprocessed or 1: + if self.runtime.print_preprocessed: import astor print('After preprocessing:') print(astor.to_source(tree.body[0], indent_with=' '))