mypy不会忽略使用语法错误的mpi4py模块

发布于 2025-01-31 12:51:33 字数 482 浏览 4 评论 0原文

在mypy.ini中,有

[mypy-mpi4py]
ignore_missing_imports = True

这个mypy会遇到以下错误,

Success: no issues found in 4 source files
s\d\L\.env\lib\site-packages\mpi4py\MPI.pyi:948: error:
invalid syntax  [syntax]
        def __new__(cls, buf: Buffer, /) -> memory: ...
                                       ^
Found 1 error in 1 file (errors prevented further checking)
Success: no issues found in 3 source files

如何设置配置以忽略模块?

In mypy.ini there is

[mypy-mpi4py]
ignore_missing_imports = True

With this mypy is getting the following error

Success: no issues found in 4 source files
s\d\L\.env\lib\site-packages\mpi4py\MPI.pyi:948: error:
invalid syntax  [syntax]
        def __new__(cls, buf: Buffer, /) -> memory: ...
                                       ^
Found 1 error in 1 file (errors prevented further checking)
Success: no issues found in 3 source files

How can I setup the config to ignore the module ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文