[Mlir-commits] [mlir] [mlir:python] Fix crash in from_python in type casters. (PR #191764)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Apr 13 02:46:50 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 mlir/test/python/dialects/python_test.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
--- python_test.py 2026-04-13 09:45:10.000000 +0000
+++ python_test.py 2026-04-13 09:46:18.704183 +0000
@@ -1015,17 +1015,23 @@
def testVariadicAndNormalRegionOp():
with Context() as ctx, Location.unknown(ctx):
module = Module.create()
with InsertionPoint(module.body):
region_op = test.VariadicAndNormalRegionOp(2)
- assert (typing.get_type_hints(
- test.VariadicAndNormalRegionOp.region.fget)["return"]
- is Region)
+ assert (
+ typing.get_type_hints(test.VariadicAndNormalRegionOp.region.fget)[
+ "return"
+ ]
+ is Region
+ )
assert type(region_op.region) is Region
- assert (typing.get_type_hints(
- test.VariadicAndNormalRegionOp.variadic.fget)["return"]
- is RegionSequence)
+ assert (
+ typing.get_type_hints(test.VariadicAndNormalRegionOp.variadic.fget)[
+ "return"
+ ]
+ is RegionSequence
+ )
assert type(region_op.variadic) is RegionSequence
assert isinstance(region_op.opview, OpView)
assert isinstance(region_op.operation.opview, OpView)
``````````
</details>
https://github.com/llvm/llvm-project/pull/191764
More information about the Mlir-commits
mailing list