diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-03-09 22:20:23 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-03-09 22:20:23 +0100 |
commit | 0ace0a129284ffc6646b199699c1607a316fcec0 (patch) | |
tree | 82c37d0f9c972396d0031fc757a33fc35576af5d /misc/scripts | |
parent | 7d6ae138fa7064270ee61fed747a11780c2f1c0f (diff) | |
parent | d9fa40f2df44d775e82332577d44de402b23611f (diff) | |
download | redot-engine-0ace0a129284ffc6646b199699c1607a316fcec0.tar.gz |
Merge pull request #89333 from Repiteo/enforce-eol-python
Enforce `\n` eol for Python writes
Diffstat (limited to 'misc/scripts')
-rwxr-xr-x | misc/scripts/copyright_headers.py | 2 | ||||
-rw-r--r-- | misc/scripts/dotnet_format.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/misc/scripts/copyright_headers.py b/misc/scripts/copyright_headers.py index a5e2f0c05d..8fb793976c 100755 --- a/misc/scripts/copyright_headers.py +++ b/misc/scripts/copyright_headers.py @@ -90,6 +90,6 @@ while line != "": # Dump everything until EOF fileread.close() # Write -filewrite = open(fname.strip(), "w") +filewrite = open(fname.strip(), "w", encoding="utf-8", newline="\n") filewrite.write(text) filewrite.close() diff --git a/misc/scripts/dotnet_format.py b/misc/scripts/dotnet_format.py index de414bbe30..83265be7c5 100644 --- a/misc/scripts/dotnet_format.py +++ b/misc/scripts/dotnet_format.py @@ -10,7 +10,7 @@ for path in [ "modules/mono/SdkPackageVersions.props", ]: os.makedirs(os.path.dirname(path), exist_ok=True) - with open(path, "w") as f: + with open(path, "w", encoding="utf-8", newline="\n") as f: f.write("<Project />") # Avoid importing GeneratedIncludes.props. |