summaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authorThaddeus Crews <repiteo@outlook.com>2024-03-09 14:29:24 -0600
committerThaddeus Crews <repiteo@outlook.com>2024-03-09 14:29:24 -0600
commitd9fa40f2df44d775e82332577d44de402b23611f (patch)
treef9f95b4d52fbe79a9cd1ca1b0107b14cb7c9e45b /misc
parentf28964805e44a5c068ce8fd9d1e00697fcd922dc (diff)
downloadredot-engine-d9fa40f2df44d775e82332577d44de402b23611f.tar.gz
Enforce `\n` eol for Python writes
• Ensure utf-8 encoding if previously unspecified
Diffstat (limited to 'misc')
-rwxr-xr-xmisc/scripts/copyright_headers.py2
-rw-r--r--misc/scripts/dotnet_format.py2
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.