Skip to content
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

Merged
merged 2 commits into from
Aug 5, 2024

Conversation

enkilee
Copy link
Contributor

@enkilee enkilee commented Aug 2, 2024

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

Copy link

paddle-bot bot commented Aug 2, 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.

gouzil
gouzil previously approved these changes Aug 2, 2024
Comment on lines 20 to 21
if TYPE_CHECKING:
from collections.abc import Sequence
Copy link
Member

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 之后

Copy link
Contributor Author

Choose a reason for hiding this comment

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

收到,谢谢大佬

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 🐾

@luotao1 luotao1 merged commit 75b4b78 into PaddlePaddle:develop Aug 5, 2024
31 checks passed
@SigureMo SigureMo changed the title [Typing][PEP585 Upgrade][2-3] Use stardand collections for type hints in paddle/fluid/operators/generator/* [Typing][PEP585 Upgrade][2-3] Use standard collections for type hints in paddle/fluid/operators/generator/* Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants