[Mlir-commits] [mlir] Fix how the mlir variadic Python acessor `_ods_equally_sized_accessor` is used (#101132) (PR #106003)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sun Aug 25 15:34:31 PDT 2024


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 ddb5480e6799d0de72c2cd34c1e7f9ffd154e660...c1e68b4ebd0b0e0d4638ec23dc53da4e1886d911 mlir/python/mlir/dialects/_ods_common.py mlir/test/python/dialects/ods_helpers.py
``````````

</details>

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

``````````diff
--- test/python/dialects/ods_helpers.py	2024-08-25 19:15:15.000000 +0000
+++ test/python/dialects/ods_helpers.py	2024-08-25 22:34:05.225025 +0000
@@ -257,21 +257,22 @@
         with InsertionPoint(m.body):
             v = add_dummy_value()
             ts = [IntegerType.get_signless(i * 8) for i in range(7)]
 
             op = TestOpMultiResultSegments.build_generic(
-                results=[ts[0], [ts[1], ts[2], ts[3]], [ts[4], ts[5], ts[6]]], operands=[v]
+                results=[ts[0], [ts[1], ts[2], ts[3]], [ts[4], ts[5], ts[6]]],
+                operands=[v],
             )
             start, pg = equally_sized_accessor(op.results, 2, 1, 0)
             # CHECK: start: 1, pg: 3
             print(f"start: {start}, pg: {pg}")
             # CHECK: [IntegerType(i8), IntegerType(i16), IntegerType(i24)]
-            print(types(op.results[start:start + pg]))
+            print(types(op.results[start : start + pg]))
 
             start, pg = equally_sized_accessor(op.results, 2, 1, 1)
             # CHECK: start: 4, pg: 3
             print(f"start: {start}, pg: {pg}")
             # CHECK: [IntegerType(i32), IntegerType(i40), IntegerType(i48)]
-            print(types(op.results[start:start + pg]))
+            print(types(op.results[start : start + pg]))
 
 
 run(testOdsEquallySizedAccessorMultipleSegments)

``````````

</details>


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


More information about the Mlir-commits mailing list