def update(self):
for linenum in reversed(sorted(self.updates)):<EOL><INDENT>self.replace_baseline_repr(linenum, self.updates[linenum])<EOL><DEDENT>if not self.TEST_MODE:<EOL><INDENT>path = '<STR_LIT>'.format(*os.path.splitext(self.path))<EOL>with io.open(path, '<STR_LIT:w>', encoding='<STR_LIT:utf-8>') as fh:<EOL><INDENT>fh.write('<STR_LIT:\n>'.join(self.lines))<EOL><DEDENT>print('<STR_LIT>'.format(self.showpath(path)))<EOL><DEDENT>
Replace baseline representations previously registered for update.