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
mlir/test/python/dialects/arith_dialect.py mlir/test/python/ir/builtin_types.py
mlir/test/python/ir/value.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
--- ir/builtin_types.py 2025-12-08 14:50:41.000000 +0000
+++ ir/builtin_types.py 2025-12-08 14:58:38.795311 +0000
@@ -713,11 +713,16 @@
# Test getTypeIdFunction agrees with
# mlirTypeGetTypeID(self) for an instance.
# CHECK: all equal
for t1, t2 in types:
# TODO: remove the alternative once mlir_type_subclass transition
is complete.
- tid1, tid2 = t1.static_typeid if hasattr(t1, "static_typeid") else
t1.get_static_typeid(), Type(t2).typeid
+ tid1, tid2 = (
+ t1.static_typeid
+ if hasattr(t1, "static_typeid")
+ else t1.get_static_typeid(),
+ Type(t2).typeid,
+ )
assert tid1 == tid2 and hash(tid1) == hash(
tid2
), f"expected hash and value equality {t1} {t2}"
else:
print("all equal")
@@ -728,11 +733,15 @@
assert len(typeid_dict)
# CHECK: all equal
for t1, t2 in typeid_dict.items():
# TODO: remove the alternative once mlir_type_subclass transition
is complete.
- tid1 = t1.static_typeid if hasattr(t1, "static_typeid") else
t1.get_static_typeid()
+ tid1 = (
+ t1.static_typeid
+ if hasattr(t1, "static_typeid")
+ else t1.get_static_typeid()
+ )
assert tid1 == t2.typeid and hash(tid1) == hash(
t2.typeid
), f"expected hash and value equality {t1} {t2}"
else:
print("all equal")
``````````
</details>
https://github.com/llvm/llvm-project/pull/171143
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits