'Checks for violations in a Python file.
Arguments:
file_contents: The contents of the Python file.
results: A file results objects to which violations will be added.'

def check_python_file_is_safe(self, file_contents, results):

    root_node = self.parse_python_code(file_contents, results)
    self.check_python_code_is_safe(file_contents, root_node, results)
    if (root_node is not None):
        visitor = OuterFormatVisitor(file_contents, results)
        visitor.visit(root_node)
    results.prepare_results(file_contents, line_comment_delim=self.LINE_COMMENT_DELIM)
