-
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
[CodeStyle] update ruff v0.0.289 and black 23.9.1 #57145
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
# "PLR1701", | ||
# "PLR1711", # Confirmation required | ||
"PLR1722", | ||
# "PLW3301", # Confirmation required |
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.
这次不加 NPY003 么
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.
加加加
@@ -40,6 +39,7 @@ select = [ | |||
|
|||
# NumPy-specific rules | |||
"NPY001", | |||
# "NPY003", |
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.
# 本 rule 自动修复方案不合适,因此仅仅跑一下(不加 `--fix`),之后手动修复 ruff --select NPY003 .
NPY003 不适合自动修复么?我随便看了下感觉自动修复效果还可以呀
如果不适合的话,之后需要放到 unfixable 里
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.
我都信以为真了,其他开发者肯定也会在意的
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.
改好啦
Description 里加一下本 PR 改动了什么的说明吧 |
Co-authored-by: Nyakku Shigure <sigure.qaq@gmail.com>
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.
LGTMeow 🐾
…python/paddle/base
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.
LGTMeow 🐾
…#57145) * [CodeStyle][ruff] update ruff v0.0.287 * add NPY003 * Update setup.py Co-authored-by: Nyakku Shigure <sigure.qaq@gmail.com> * update 288 * update ruff to v0.0.289; update black to 23.9.1; flake8 split ignore python/paddle/base * fix ignore * split flake8 --------- Co-authored-by: Nyakku Shigure <sigure.qaq@gmail.com>
PR types
Others
PR changes
Others
Description
此 PR 工作: 升级
ruff
至 v0.0.289 并新增检查, 重新打开PLR1722
检查. 由于新版本检查更为严格, 所以在pyproject.toml
单独 ignore 文件(后续修复). 同时 ignore./python/paddle/base/**
为后续引入做准备.第一阶段
存量统计
升级
ruff
至 v0.0.289 并新增检查存量 tracking issue
新增
第二阶段
ruff
删除
ignore
中的./python/paddle/base/**
选项的错误码, 并修复已存在的所有检查flake8
删除
per-file-ignores
中的# tmp ignore
下对应的错误码, 并修复已存在的所有检查相关文档
常用命令