未验证 提交 2dcb0ebf 编写于 作者: N Nyakku Shigure 提交者: GitHub

[Dy2St] skip compare between func and module attribute to fix NumPy 1.25 error (#55482)

上级 26fba07c
......@@ -119,10 +119,9 @@ def is_unsupported(func):
for m in BUILTIN_LIKELY_MODULES:
for v in m.__dict__.values():
func_in_dict = func == v
if isinstance(func_in_dict, (list, numpy.ndarray)):
func_in_dict = numpy.array(func_in_dict).any()
if func_in_dict:
if not callable(v):
continue
if func is v:
translator_logger.log(
2,
"Whitelist: {} is part of built-in module and does not have to be transformed.".format(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册