'Called when a file has been refactored, and there are changes.'

def processed_file(self, new_text, filename, old_text=None, write=False, encoding=None):

    self.files.append(filename)
    if (old_text is None):
        old_text = self._read_python_source(filename)[0]
        if (old_text is None):
            return
    equal = (old_text == new_text)
    self.print_output(old_text, new_text, filename, equal)
    if equal:
        self.log_debug('No    changes    to    %s', filename)
        return
    else:
        if write:
            self.write_file(new_text, filename, old_text, encoding)
        else:
            self.log_debug('Not    writing    changes    to    %s', filename)
        return
