-
Notifications
You must be signed in to change notification settings - Fork 5.9k
[Typing] Add type annotations for op_generator/op_gen.py/ op_generator/op_interface_gen.py
#66384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
输出 type 可以看情况加一加,但不加也没啥大问题,反正这个只是生成脚本不是公开 API
是 PIR 单测修复为牵引梳理代码是吧,顺带加加类型提示这样挺好的~
| import pathlib | ||
| import sys | ||
| from collections import namedtuple | ||
| from typing import Dict, List, Tuple |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
使用 PEP 563,并直接使用 builtin 的 dict、list、tuple
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
其余没啥问题
目测是的,之后单独提 PR 修一下吧,之后找相关同学 review 下 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…ator/op_interface_gen.py` (PaddlePaddle#66384)
…ator/op_interface_gen.py` (PaddlePaddle#66384)
PR Category
User Experience
PR Types
Improvements
Description
添加类型提示
相关链接