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 
clang/bindings/python/clang/cindex.py 
clang/bindings/python/tests/cindex/test_cursor.py 
clang/bindings/python/tests/cindex/test_enums.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
--- tests/cindex/test_cursor.py 2026-08-31 14:27:31.000000 +0000
+++ tests/cindex/test_cursor.py 2026-08-31 14:43:42.242870 +0000
@@ -986,11 +986,12 @@
         for op, typ in operators.items():
             c = get_cursor(tu, op)
             assert c.binary_operator == typ
 
     def test_unaryop(self):
-        tu = get_tu("""
+        tu = get_tu(
+            """
             void func(void) {
                 int a = 0;
                 a++;
                 ++a;
                 a--;
@@ -1003,11 +1004,13 @@
                 float _Complex b;
                 __real b;
                 __imag b;
                 __extension__ a;
             }
-        """, lang="cpp")
+        """,
+            lang="cpp",
+        )
 
         operators = {
             "&": UnaryOperator.AddrOf,
             "*": UnaryOperator.Deref,
             "+": UnaryOperator.Plus,
@@ -1022,12 +1025,18 @@
         for op, typ in operators.items():
             c = get_cursor(tu, op)
             assert c.unary_operator == typ
 
         for should_be, has in zip(
-                (UnaryOperator.PostInc, UnaryOperator.PreInc, 
UnaryOperator.PostDec, UnaryOperator.PreDec),
-                list(next(tu.cursor.get_children()).get_children())[1:]):
+            (
+                UnaryOperator.PostInc,
+                UnaryOperator.PreInc,
+                UnaryOperator.PostDec,
+                UnaryOperator.PreDec,
+            ),
+            list(next(tu.cursor.get_children()).get_children())[1:],
+        ):
             assert should_be == has
 
     def test_from_result_null(self):
         tu = get_tu("int a = 1+2;", lang="cpp")
         op = next(next(tu.cursor.get_children()).get_children())

``````````

</details>


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

Reply via email to