Spaces:
Sleeping
Sleeping
Create patch_manager.py
Browse files- patch_manager.py +9 -0
patch_manager.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
|
| 3 |
+
def prepare_patch(code):
|
| 4 |
+
return code
|
| 5 |
+
|
| 6 |
+
def apply_patch(target_file, code):
|
| 7 |
+
with open(target_file, "w", encoding="utf8") as f:
|
| 8 |
+
f.write(code)
|
| 9 |
+
return True
|