--- a/Plugins/CheckerPlugins/CodeStyleChecker/pep8.py Thu Jan 16 18:28:34 2014 +0100 +++ b/Plugins/CheckerPlugins/CodeStyleChecker/pep8.py Thu Jan 16 18:45:45 2014 +0100 @@ -68,6 +68,7 @@ import inspect import keyword import tokenize +import ast from optparse import OptionParser from fnmatch import fnmatch try: @@ -93,7 +94,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(['>>', '**', '*', '+', '-']) @@ -1509,7 +1509,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: