[Mlir-commits] [mlir] [mlir:python] Compute get_op_result_or_value in PyOpView's constructor. (PR #123953)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Jan 22 07:23:02 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 e30b703060bb6741fb5e5e05e6b37802bc29b4ce...834eb77858c8c4b0aa06bf239b55536b4b242234 mlir/python/mlir/dialects/_ods_common.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- _ods_common.py 2025-01-22 15:17:34.000000 +0000
+++ _ods_common.py 2025-01-22 15:22:34.051951 +0000
@@ -113,11 +113,14 @@
arg: _Union[
_cext.ir.OpView,
_cext.ir.Operation,
_Sequence[_Union[_cext.ir.OpView, _cext.ir.Operation, _cext.ir.Value]],
]
-) -> _Union[_Sequence[_Union[_cext.ir.OpView, _cext.ir.Operation, _cext.ir.Value]], _cext.ir.OpResultList]:
+) -> _Union[
+ _Sequence[_Union[_cext.ir.OpView, _cext.ir.Operation, _cext.ir.Value]],
+ _cext.ir.OpResultList,
+]:
"""Returns the given sequence of values or the results of the given op.
This is useful to implement op constructors so that they can take other ops as
lists of arguments instead of requiring the caller to extract results for
every op.
``````````
</details>
https://github.com/llvm/llvm-project/pull/123953
More information about the Mlir-commits
mailing list