From dfe1e025ee93639cbfa36a9150d16362c318c038 Mon Sep 17 00:00:00 2001 From: LCD 47 Date: Mon, 6 Jan 2014 17:04:55 +0200 Subject: [PATCH] Python: code being checked shouldn't inherit future statements. --- syntax_checkers/python/compile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax_checkers/python/compile.py b/syntax_checkers/python/compile.py index 31b0eda9..32f1413d 100755 --- a/syntax_checkers/python/compile.py +++ b/syntax_checkers/python/compile.py @@ -8,6 +8,6 @@ if len(argv) != 2: exit(1) try: - compile(open(argv[1]).read(), argv[1], 'exec') + compile(open(argv[1]).read(), argv[1], 'exec', 0, 1) except SyntaxError as err: print('%s:%s:%s: %s' % (err.filename, err.lineno, err.offset, err.msg))