mimo-openenv-software / solutions /format-code-task-002220.py
akseljoonas's picture
Publish validated twelve-task MiMo curriculum and immutable image request
2a3480c verified
Raw History Blame Contribute Delete
499 Bytes
"""Reference repair for validation only; excluded from training images."""
from pathlib import Path
path = Path('pandas/io/excel/_openpyxl.py')
text = path.read_text()
marker = ' self.book.save(self.handles.handle)'
assert text.count(marker) == 1
text = text.replace(marker, ''' if "r+" in self.mode:
self.handles.handle.seek(0)
self.book.save(self.handles.handle)
if "r+" in self.mode:
self.handles.handle.truncate()''')
path.write_text(text)