[llvm] [llvm-strings] Use small buffer instead of reading whole file (PR #163073)

via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 22 10:54:54 PDT 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {darker}-->


:warning: Python code formatter, darker found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
darker --check --diff -r origin/main...HEAD llvm/test/tools/llvm-strings/chunk-boundary.py
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from darker here.
</summary>

``````````diff
--- chunk-boundary.py	2026-09-22 17:50:19.000000 +0000
+++ chunk-boundary.py	2026-09-22 17:53:59.490474 +0000
@@ -100,13 +100,11 @@
 )
 args = parser.parse_intermixed_args()
 
 repeat = args.repeat or [1] * len(args.parts)
 if len(repeat) != len(args.parts):
-    parser.error(
-        "--repeat has %d counts for %d PARTs" % (len(repeat), len(args.parts))
-    )
+    parser.error("--repeat has %d counts for %d PARTs" % (len(repeat), len(args.parts)))
 
 out = b"".join(
     (b"\0" * int(part) if part.isdigit() else part.encode()) * count
     for part, count in zip(args.parts, repeat)
 )

``````````

</details>


https://github.com/llvm/llvm-project/pull/163073


More information about the llvm-commits mailing list