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 /doc | |
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 'doc')
-rwxr-xr-x | doc/tools/make_rst.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/tools/make_rst.py b/doc/tools/make_rst.py index d871535a66..51d67d3456 100755 --- a/doc/tools/make_rst.py +++ b/doc/tools/make_rst.py @@ -891,9 +891,9 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir: class_name = class_def.name if dry_run: - f = open(os.devnull, "w", encoding="utf-8") + f = open(os.devnull, "w", encoding="utf-8", newline="\n") else: - f = open(os.path.join(output_dir, f"class_{class_name.lower()}.rst"), "w", encoding="utf-8") + f = open(os.path.join(output_dir, f"class_{class_name.lower()}.rst"), "w", encoding="utf-8", newline="\n") # Remove the "Edit on Github" button from the online docs page. f.write(":github_url: hide\n\n") @@ -1691,9 +1691,9 @@ def make_link(url: str, title: str) -> str: def make_rst_index(grouped_classes: Dict[str, List[str]], dry_run: bool, output_dir: str) -> None: if dry_run: - f = open(os.devnull, "w", encoding="utf-8") + f = open(os.devnull, "w", encoding="utf-8", newline="\n") else: - f = open(os.path.join(output_dir, "index.rst"), "w", encoding="utf-8") + f = open(os.path.join(output_dir, "index.rst"), "w", encoding="utf-8", newline="\n") # Remove the "Edit on Github" button from the online docs page, and disallow user-contributed notes # on the index page. User-contributed notes are allowed on individual class pages. |