[Mlir-commits] [mlir] [mlir][Python] create MLIRPythonSupport (PR #171775)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Fri Dec 19 13:23:37 PST 2025
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 2025-12-19 21:21:36.000000 +0000
+++ python_test.py 2025-12-19 21:23:02.587717 +0000
@@ -625,13 +625,22 @@
# The following must trigger a TypeError from our adaptors and must not
# crash.
try:
TestType(42)
except TypeError as e:
- assert "__init__(): incompatible function arguments. The following argument types are supported" in str(e)
- assert "__init__(self, cast_from_type: mlir._mlir_libs._mlir.ir.Type) -> None" in str(e)
- assert "Invoked with types: mlir._mlir_libs._mlirPythonTestNanobind.TestType, int" in str(e)
+ assert (
+ "__init__(): incompatible function arguments. The following argument types are supported"
+ in str(e)
+ )
+ assert (
+ "__init__(self, cast_from_type: mlir._mlir_libs._mlir.ir.Type) -> None"
+ in str(e)
+ )
+ assert (
+ "Invoked with types: mlir._mlir_libs._mlirPythonTestNanobind.TestType, int"
+ in str(e)
+ )
else:
raise
# The following must trigger a TypeError from pybind (therefore, not
# checking its message) and must not crash.
``````````
</details>
https://github.com/llvm/llvm-project/pull/171775
More information about the Mlir-commits
mailing list