-
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][C-116,C-117] Add type annotations for "paddle/geometric/*" #66792
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
38fad68
test
successfulbarrier 65505a2
添加chunk图例
successfulbarrier d99fc80
删除测试
successfulbarrier 4b974fd
pre-commit完善
successfulbarrier 9373686
1
successfulbarrier fc1b6bb
将文档修改部分还原
successfulbarrier c511aad
修改并添加了neighbors的类型注释
successfulbarrier ebb3fe8
overload重载
successfulbarrier b043ca1
修正overload
successfulbarrier 78549c7
再次修改
successfulbarrier 3bc4935
再次修改2
successfulbarrier File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
重写了一遍函数?
overload
不是这么用的,可以搜一下已经使用了overload
标注的地方 ~一个简单的例子
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.
改的还是有点问题,注意几个地方:
overload
中一般不写具体参数值,更不能更改原赋值overload
中使用Literal
,如果原定义中有默认值,可以跟= ...
arg1: bool = ...
的overload
,用于针对参数传值而非直接传值overload
后,原函数不需要再标注类型(也可以不定义最后的overload
,而直接在原函数中标注)overload
本身有些行为定义的还不是很清楚,但,一定要分清楚类型标注和默认值的关系 ~p.s. 更新了上面的示例
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.
是这样吗?