[mlir][python] Disable pytype not-yet-supported error on Buffer import (#189440)
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.
This commit is contained in:
parent
ebc7b2f04e
commit
7ccd92e5e6
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user