Skip to content

Commit ae671cc

Browse files
gouzilLittleHeroZZZX
authored andcommitted
[CodeStyle] Remove black and add yamlfmt ruff format ruff check in contribution guide (PaddlePaddle#7397)
1 parent 48e7fca commit ae671cc

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

docs/dev_guides/code_contributing_path_cn.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,14 +164,15 @@ Tabs remover (C++)...................................(no files to check)Skipped
164164
Tabs remover (Python)....................................................Passed
165165
copyright_checker........................................................Passed
166166
typos....................................................................Passed
167-
black....................................................................Passed
168-
ruff.....................................................................Passed
167+
ruff check...............................................................Passed
168+
ruff format..............................................................Passed
169169
clang-format.........................................(no files to check)Skipped
170170
cpplint..............................................(no files to check)Skipped
171171
clang-tidy...........................................(no files to check)Skipped
172172
auto-generate-cmakelists.............................(no files to check)Skipped
173173
cmake-format.........................................(no files to check)Skipped
174174
CMake Lint...........................................(no files to check)Skipped
175+
yamlfmt..................................................................Passed
175176
sort-txt-file........................................(no files to check)Skipped
176177
[my-cool-stuff e309f4805e] add a new file test.md
177178
1 file changed, 0 insertions(+), 0 deletions(-)

docs/dev_guides/git_guides/codestyle_check_guide_cn.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ Tabs remover (C++).......................................................Passed
4343
Tabs remover (Python)................................(no files to check)Skipped
4444
copyright_checker........................................................Passed
4545
typos....................................................................Passed
46-
black................................................(no files to check)Skipped
47-
ruff.................................................(no files to check)Skipped
46+
ruff check...........................................(no files to check)Skipped
47+
ruff format..........................................(no files to check)Skipped
4848
clang-format.............................................................Failed
4949
- hook id: clang-format
5050
- files were modified by this hook
@@ -53,6 +53,8 @@ clang-tidy...............................................................Passed
5353
auto-generate-cmakelists.............................(no files to check)Skipped
5454
cmake-format.........................................(no files to check)Skipped
5555
CMake Lint...........................................(no files to check)Skipped
56+
yamlfmt..................................................................Passed
57+
sort-txt-file........................................(no files to check)Skipped
5658
➜ git diff
5759
diff --git a/paddle/phi/kernels/abs_kernel.h b/paddle/phi/kernels/abs_kernel.h
5860
index 7e06204845..c1b803b44f 100644
@@ -85,13 +87,13 @@ Date: xxx
8587
| [Lucas-C/pre-commit-hooks](https://github.com/Lucas-C/pre-commit-hooks.git) | 社区维护的一些通用的 hook,含将 CRLF 改为 LF、移除 Tab 等 hook | 1.5.1 |
8688
| [copyright_checker](https://github.com/PaddlePaddle/Paddle/blob/develop/tools/codestyle/copyright.hook) | Copyright 检查 | 本地脚本 |
8789
| [typos](https://github.com/crate-ci/typos) | 拼写错误检查 | 1.30.2 |
88-
| [black](https://github.com/psf/black) | Python 代码格式化 | 25.1.0 |
8990
| [ruff](https://github.com/astral-sh/ruff) | Python 代码风格检查 | 0.12.0 |
9091
| [clang-format](https://github.com/llvm/llvm-project/tree/main/clang/tools/clang-format) | C++ 代码格式化 | 13.0.0 |
9192
| [cpplint](https://github.com/cpplint/cpplint) | C++ 代码风格检查 | 1.6.0 |
9293
| [clang-tidy](https://github.com/llvm/llvm-project/tree/main/clang-tools-extra/clang-tidy) | C++ 代码风格检查 | 15.0.2.1 |
9394
| [cmake-format](https://github.com/cheshirekow/cmake-format-precommit) | CMake 代码格式化 | 0.6.13 |
9495
| [cmake-lint](https://github.com/PFCCLab/cmake-lint-paddle)| CMake 代码风格检查 | 1.5.1 |
96+
| [yamlfmt](https://github.com/PFCCLab/yamlfmt-pre-commit-mirror.git) | YAML 代码格式化 | 0.16.0 |
9597
9698
> 注:这些工具可能会更新,详细配置请查看:[https://github.com/PaddlePaddle/Paddle/blob/develop/.pre-commit-config.yaml](https://github.com/PaddlePaddle/Paddle/blob/develop/.pre-commit-config.yaml)。
9799

0 commit comments

Comments
 (0)