Skip to content

Conversation

@ooooo-create
Copy link
Contributor

PR Category

User Experience

PR Types

Others

Description

Update placements Type Hints for public api
python 中 list[T] 是不变(不相关)的,要求精准匹配类型参数 T
Sequence[T] 是协变性,如果 B 是 A 的子类,那么 Sequence[B] 可以看成 Sequence[A] 的子类型
看了 Torch 中也是这样

@paddle-bot
Copy link

paddle-bot bot commented Aug 13, 2025

你的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 Aug 13, 2025
@ooooo-create ooooo-create changed the title [Auto Parallel] Update placements Type Hints for public api [Type Hints] Update placements Type Hints for public api Aug 13, 2025
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 [Type Hints] Update placements Type Hints for public api [Typing] Update placements Type Hints for public api Aug 13, 2025
@ooooo-create
Copy link
Contributor Author

/re-run all-failed

1 similar comment
@ooooo-create
Copy link
Contributor Author

/re-run all-failed

@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Aug 14, 2025
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 🐾

@ooooo-create
Copy link
Contributor Author

/re-run all-failed

@SigureMo SigureMo merged commit e2c10ca into PaddlePaddle:develop Aug 15, 2025
132 of 137 checks passed
@ooooo-create ooooo-create deleted the refine_type_hints_use_sequence branch September 29, 2025 09:43
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 skip-ci: all

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants