--- a/Plugins/CheckerPlugins/CodeStyleChecker/pep8.py Sun Mar 30 22:00:14 2014 +0200 +++ b/Plugins/CheckerPlugins/CodeStyleChecker/pep8.py Thu Apr 03 23:05:31 2014 +0200 @@ -68,6 +68,7 @@ import inspect import keyword import tokenize +import ast from optparse import OptionParser from fnmatch import fnmatch try: @@ -91,7 +92,6 @@ 'pylint': '%(path)s:%(row)d: [%(code)s] %(text)s', } -PyCF_ONLY_AST = 1024 SINGLETONS = frozenset(['False', 'None', 'True']) KEYWORDS = frozenset(keyword.kwlist + ['print']) - SINGLETONS UNARY_OPERATORS = frozenset(['>>', '**', '*', '+', '-']) @@ -1352,7 +1352,7 @@ def check_ast(self): try: - tree = compile(''.join(self.lines), '', 'exec', PyCF_ONLY_AST) + tree = compile(''.join(self.lines), '', 'exec', ast.PyCF_ONLY_AST) except (SyntaxError, TypeError): return self.report_invalid_syntax() for name, cls, _ in self._ast_checks: