[Mlir-commits] [mlir] [mlir][python] Disable pytype not-yet-supported error on Buffer import (PR #189440)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Mar 30 11:00:51 PDT 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: Jackson Stogel (jtstogel)
<details>
<summary>Changes</summary>
For pyhon versions <3.12, pytype complains that:
```
error: in <module>: collections.abc.Buffer not supported yet [not-supported-yet]
from collections.abc import Buffer as _Buffer
```
Since it seems like this code intends to support <3.12, disabling the type error on this line.
---
Full diff: https://github.com/llvm/llvm-project/pull/189440.diff
1 Files Affected:
- (modified) mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp (+1-1)
``````````diff
diff --git a/mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp b/mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp
index 14c76295daaee..14500edca5bcf 100644
--- a/mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp
+++ b/mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp
@@ -49,7 +49,7 @@ import builtins
from typing import Any as _Any, Sequence as _Sequence, Union as _Union, Optional as _Optional
import sys as _sys
if _sys.version_info >= (3, 12):
- from collections.abc import Buffer as _Buffer
+ from collections.abc import Buffer as _Buffer # pytype: disable=not-supported-yet
else:
try:
from typing_extensions import Buffer as _Buffer
``````````
</details>
https://github.com/llvm/llvm-project/pull/189440
More information about the Mlir-commits
mailing list