[clang] 74d29c6 - [clang-format] Open plurals.txt in read-only mode in dump_format_style.py
Owen Pan via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 5 19:25:40 PST 2024
Author: Owen Pan
Date: 2024-12-05T19:25:32-08:00
New Revision: 74d29c6393df606e98e7c42b9a97f56f335e3ffb
URL: https://github.com/llvm/llvm-project/commit/74d29c6393df606e98e7c42b9a97f56f335e3ffb
DIFF: https://github.com/llvm/llvm-project/commit/74d29c6393df606e98e7c42b9a97f56f335e3ffb.diff
LOG: [clang-format] Open plurals.txt in read-only mode in dump_format_style.py
Added:
Modified:
clang/docs/tools/dump_format_style.py
Removed:
################################################################################
diff --git a/clang/docs/tools/dump_format_style.py b/clang/docs/tools/dump_format_style.py
index c82b4479f299d9..c98f2bdcb4f2f0 100755
--- a/clang/docs/tools/dump_format_style.py
+++ b/clang/docs/tools/dump_format_style.py
@@ -20,7 +20,7 @@
PLURALS_FILE = os.path.join(os.path.dirname(__file__), "plurals.txt")
plurals: Set[str] = set()
-with open(PLURALS_FILE, "a+") as f:
+with open(PLURALS_FILE) as f:
f.seek(0)
plurals = set(f.read().splitlines())
More information about the cfe-commits
mailing list