[Mlir-commits] [mlir] [mlir][python] remove mixins (PR #68853)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Oct 11 23:39:02 PDT 2023
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 9dd15f7486a30c4269b183f72c13006eb8c929f4..a00e3dcd00d979c9ead2fba292741a5bced81d3a mlir/python/mlir/dialects/_ods_common.py mlir/python/mlir/dialects/arith.py mlir/python/mlir/dialects/bufferization.py mlir/python/mlir/dialects/builtin.py mlir/python/mlir/dialects/func.py mlir/python/mlir/dialects/linalg/opdsl/lang/emitter.py mlir/python/mlir/dialects/memref.py mlir/python/mlir/dialects/ml_program.py mlir/python/mlir/dialects/pdl.py mlir/python/mlir/dialects/scf.py mlir/python/mlir/dialects/tensor.py mlir/python/mlir/dialects/transform/__init__.py mlir/python/mlir/dialects/transform/bufferization.py mlir/python/mlir/dialects/transform/gpu.py mlir/python/mlir/dialects/transform/loop.py mlir/python/mlir/dialects/transform/memref.py mlir/python/mlir/dialects/transform/pdl.py mlir/python/mlir/dialects/transform/structured.py mlir/python/mlir/dialects/transform/tensor.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- arith.py 2023-10-12 06:25:13.000000 +0000
+++ arith.py 2023-10-12 06:38:53.145720 +0000
@@ -6,11 +6,14 @@
from ._arith_ops_gen import _Dialect
from ._arith_enum_gen import *
try:
from ..ir import *
- from ._ods_common import get_default_loc_context as _get_default_loc_context, _cext as _ods_cext
+ from ._ods_common import (
+ get_default_loc_context as _get_default_loc_context,
+ _cext as _ods_cext,
+ )
from typing import Any, List, Union
except ImportError as e:
raise RuntimeError("Error loading imports from extension module") from e
@@ -31,10 +34,11 @@
return _is_any_of(type, [IntegerType, IndexType])
def _is_float_type(type: Type):
return _is_any_of(type, [BF16Type, F16Type, F32Type, F64Type])
+
@_ods_cext.register_operation(_Dialect, replace=True)
class ConstantOp(ConstantOp):
"""Specialization for the constant op class."""
``````````
</details>
https://github.com/llvm/llvm-project/pull/68853
More information about the Mlir-commits
mailing list