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 libclc/test/lit.cfg.py 
libclc/test/update_libclc_tests.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
--- update_libclc_tests.py      2026-05-22 10:34:28.000000 +0000
+++ update_libclc_tests.py      2026-05-22 10:36:26.539533 +0000
@@ -66,11 +66,13 @@
     content = content.replace(b"%check_prefix", check_prefix.encode())
     content = content.replace(b"%libclc_lib", b"")
     path.write_bytes(content)
 
 
-def revert_in_file(path: Path, triple: str, cpu: str, check_prefix: str, 
original: bytes):
+def revert_in_file(
+    path: Path, triple: str, cpu: str, check_prefix: str, original: bytes
+):
     # Only revert in the RUN line context, not in generated CHECK lines.
     content = path.read_bytes()
     content = content.replace(f"--target={triple}".encode(), 
b"--target=%target")
     if cpu:
         content = content.replace(f"-mcpu={cpu}".encode(), b"-mcpu=%cpu")
@@ -98,16 +100,18 @@
 
 
 def _restore_libclc_lib(content: bytes, original: bytes) -> bytes:
     RUN_MARKERS = (b"// RUN:", b"; RUN:")
     orig_run_lines = [
-        l for l in original.splitlines(keepends=True)
+        l
+        for l in original.splitlines(keepends=True)
         if any(l.lstrip().startswith(m) for m in RUN_MARKERS)
     ]
     curr_lines = content.splitlines(keepends=True)
     curr_run_indices = [
-        i for i, l in enumerate(curr_lines)
+        i
+        for i, l in enumerate(curr_lines)
         if any(l.lstrip().startswith(m) for m in RUN_MARKERS)
     ]
     result = list(curr_lines)
     for idx, orig_line in zip(curr_run_indices, orig_run_lines):
         result[idx] = orig_line

``````````

</details>


https://github.com/llvm/llvm-project/pull/199164
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to