mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 10:44:36 +08:00
set encodings for opcode_metadata scripts
This commit is contained in:
1 parent
d2166dd93a
commit
d257d95362
1 file changed
+2
-2
@@ -49,7 +49,7 @@ def extract_enum_body(contents: str, enum_name: str) -> str:
|
||||
)
|
||||
|
||||
|
||||
contents = BYTECODE_FILE.read_text()
|
||||
contents = BYTECODE_FILE.read_text(encoding="utf-8")
|
||||
enum_body = "\n".join(
|
||||
extract_enum_body(contents, enum_name)
|
||||
for enum_name in ("Instruction", "PseudoInstruction")
|
||||
@@ -78,4 +78,4 @@ HAVE_ARGUMENT = 44
|
||||
MIN_INSTRUMENTED_OPCODE = 236
|
||||
"""
|
||||
|
||||
OPCODE_METADATA_FILE.write_text(output)
|
||||
OPCODE_METADATA_FILE.write_text(output, encoding="utf-8")
|
||||
Reference in new issue
Block a user