code: def run(path, code=None, params=None, **meta):
          
          import _ast
  
          builtins = params.get("builtins", "")
  
          if builtins:
              builtins = builtins.split(",")
  
          tree = compile(code, path, "exec", _ast.PyCF_ONLY_AST)
          w = checker.Checker(tree, path, builtins=builtins)
          w.messages = sorted(w.messages, key=lambda m: m.lineno)
          return [{
              'lnum': m.lineno,
              'text': m.message % m.message_args,
              'type': m.message[0]
          } for m in w.messages]
docs: Check code with pyflakes.
  
          :return list: List of errors.