[Mlir-commits] [mlir] [MLIR][Python] add type hints for accessors (PR #158455)

Sergei Lebedev llvmlistbot at llvm.org
Mon Sep 15 02:18:01 PDT 2025


================
@@ -191,7 +197,7 @@ constexpr const char *opVariadicSegmentOptionalTrailingTemplate =
 ///   {1} is the original name of the attribute.
 constexpr const char *attributeGetterTemplate = R"Py(
   @builtins.property
-  def {0}(self):
+  def {0}(self) -> _ods_ir.Attribute:
----------------
superbobry wrote:

Can we use a more specific type for attributes here and below?

https://github.com/llvm/llvm-project/pull/158455


More information about the Mlir-commits mailing list