-
Notifications
You must be signed in to change notification settings - Fork 5.9k
[CodeStyle] Move black to ruff format, initial pre-commit config setup for mix check mode - part 22
#74677
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
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
.pre-commit-config.yaml
Outdated
| - id: black | ||
| exclude: | | ||
| (?x)^( | ||
| third_party/.+| |
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.
这个已经在顶层 exclude 掉了,这里就不重复写了
.pre-commit-config.yaml
Outdated
| - id: ruff-check | ||
| args: [--fix, --exit-non-zero-on-fix, --no-cache] | ||
| - id: ruff-format | ||
| files: \.(py|pyi)$ |
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.
这里写 files 是有必要的么?
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.
测了下好像没必要,先删了
black -> ruff format migration, pre-commit monitoring - part 22black to ruff format, initial pre-commit config setup for mix check mode - part 22
| # | test/[m-z].+ | ||
| # | tools/.+ | ||
| )$ |
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.
由于 exclude 不能写注释所以不能写注释防止冲突
我试了下应该可以,之后每个 PR 注释下面,解开上面就好了
特意空一行以免冲突
PR Category
User Experience
PR Types
Not User Facing
Description
可以使用下面的代码查看哪些文件夹是可以由
ruff format完全接管