-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[Typing][PEP585 Upgrade][2-3] Use standard collections for type hints in paddle/fluid/operators/generator/*
#66968
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
if TYPE_CHECKING: | ||
from collections.abc import Sequence |
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.
不要插在 import 中间,这会影响 isort,要放在 import 区域之后
你这样会使得 import 分成三部分,这不是我们所预期的
# import section1, sorted
# if type checking
# import section3, sorted
# import section2, sorted
预期的是:
# import section1, sorted
# if type checking
# import section2, sorted
因此 if TYPE_CHECKING
统一放在其他 import 之后
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.
收到,谢谢大佬
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.
paddle/fluid/operators/generator/*
paddle/fluid/operators/generator/*
PR Category
User Experience
PR Types
Devs
Description
为如下文件添加 PEP 563,并进行 PEP 585 升级:
paddle/fluid/operators/generator/filters.py
paddle/fluid/operators/generator/parse_utils.py
Related links