Skip to content

Conversation

megemini
Copy link
Contributor

PR Category

Others

PR Types

Bug fixes

Description

修改:

  • 在 tensor.prototype.pyi 中增加 property setter
  • 修改 gen_tensor_stub.py ,防止原模板中的 comment 被添加了两次

@SigureMo

Copy link

paddle-bot bot commented Jun 13, 2024

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot bot added the contributor External developers label Jun 13, 2024
@@ -19,7 +19,7 @@
# Import common typings for generated methods
# isort: off
from typing import * # noqa: F403
from typing_extensions import * # noqa: F403
from typing_extensions import * # type: ignore # noqa: F403
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这些 # type: ignore 的作用是?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mypy 检查这个文件的时候提示:

image

像是兼容问题导致的 ~

我觉得吧,目前可以暂时先这样,最后还是要去掉 import * ,然后加上对于 tensor.pyi 的 mypy 检查 ~

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

后面 __radd__ 的那几个

image

没什么影响,所以加上了 ~

Copy link
Member

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTMeow 🐾

@SigureMo SigureMo changed the title [Fix] Tensor stub property setter and stub add comment twice [Typing] Tensor stub property setter and stub add comment twice Jun 13, 2024
@SigureMo SigureMo merged commit 91be243 into PaddlePaddle:develop Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants