[CodeStyle] Use pycon for code-block language marker - part9#77611
[CodeStyle] Use pycon for code-block language marker - part9#77611SigureMo merged 2 commits intoPaddlePaddle:developfrom
pycon for code-block language marker - part9#77611Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
SigureMo
left a comment
There was a problem hiding this comment.
这个 PR 需要重新创建一个空的 commit 来触发 CI 了,比如
git commit -m "empty commit, trigger CI" --allow-empty之后 push 上来即可
pycon for code-block language marker - part9
|
/re-run all-failed |
|
/re-run all |
|
不要 rerun all 啊……只能 rerun all-failed,这不是全白跑了 |
|
/re-run |
There was a problem hiding this comment.
Pull request overview
This PR updates documentation code blocks to use the pycon language marker instead of python when interactive Python console markers (>>>) are present. The changes cover files in python/paddle/nn/initializer and python/paddle/nn/utils directories.
Changes:
- Updated code-block directives from
pythontopyconfor 10 docstring examples containing interactive console markers - Added trailing commas to improve multi-line function call formatting consistency in several examples
- Fixed incorrect array dimensions in
assign.pyexamples (the weight/bias shapes now correctly match Linear layer expectations)
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| python/paddle/nn/utils/weight_norm_hook.py | Changed code-block directive to pycon |
| python/paddle/nn/utils/spectral_norm_hook.py | Changed code-block directive to pycon |
| python/paddle/nn/utils/clip_grad_norm_.py | Changed code-block directive to pycon |
| python/paddle/nn/initializer/xavier.py | Changed code-block directive to pycon and added trailing commas for style consistency |
| python/paddle/nn/initializer/orthogonal.py | Changed code-block directive to pycon |
| python/paddle/nn/initializer/normal.py | Changed code-block directive to pycon and added trailing commas for style consistency |
| python/paddle/nn/initializer/kaiming.py | Changed code-block directive to pycon |
| python/paddle/nn/initializer/initializer.py | Changed code-block directive to pycon |
| python/paddle/nn/initializer/bilinear.py | Changed code-block directive to pycon and reformatted function calls for better readability |
| python/paddle/nn/initializer/assign.py | Changed code-block directive to pycon and corrected array dimensions in examples to match Linear layer expectations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
PR Category
User Experience
PR Types
Docs
Description
Change
.. code-block:: pythonto.. code-block:: pyconwhen>>>is present.This PR covers:
python/paddle/nn/initializerpython/paddle/nn/utils