Skip to content
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

add RFC of introducing ruff #412

Merged
merged 11 commits into from
Mar 10, 2023
Merged

add RFC of introducing ruff #412

merged 11 commits into from
Mar 10, 2023

Conversation

SigureMo
Copy link
Member

@SigureMo SigureMo commented Mar 4, 2023

引入 Ruff 的 RFC~

@paddle-bot
Copy link

paddle-bot bot commented Mar 4, 2023

你的PR提交成功,感谢你对开源项目的贡献!
请检查PR提交格式和内容是否完备,具体请参考示例模版
Your PR has been submitted. Thanks for your contribution!
Please check its format and content. For this, you can refer to Template and Demo.

@SigureMo SigureMo marked this pull request as draft March 4, 2023 16:05
@SigureMo SigureMo marked this pull request as ready for review March 4, 2023 17:48
@luotao1 luotao1 self-assigned this Mar 6, 2023
## 七、排期规划

- NumPy-specific rules(NPY001)
- pyupgrade(UP)
Copy link
Collaborator

@luotao1 luotao1 Mar 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 初始化 ruff 配置:@SigureMo #51201
  • pyupgrade(UP):@SigureMo #50477,共修复16个子项 xxx行
  • NumPy-specific rules(NPY001):xxx个子项 xxx行
  • xxx:xxx个子项 xxx行

luotao1
luotao1 previously approved these changes Mar 8, 2023
Comment on lines +68 to +69
由于 Ruff 自开始开发以来时间还不长,因此使用 Ruff 的项目还不多,但目前正在高速增长着,在 GitHub 上已经拥有 9.5k Star,在 Python 社区非常受欢迎。目前 Ruff 已经被 pandas、Transformers (Hugging Face)、Diffusers (Hugging Face)、SciPy、Jupyter、Pylint 等知名项目所使用。

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, I observed that Ruff is in the high-speed iterative development stage. The latest version at the beginning of March 2023 is 0.0.254. If we start to use it now, we also need to pay attention to updating the version several times in the future weeks or months until it is stable.

Copy link
Member Author

@SigureMo SigureMo Mar 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

嗯嗯对的,不过在锁版本的前提下 Ruff 本身的提示、修复效果足够稳定,目前在 Paddle 的实验还没有发现误检测的情况,如果遇到相关情况也是可以通过禁用这条 rule 来确保对代码库无影响。

关于更新版本的成本,我认为偶尔更新即可(比如一个月),不需要频繁更新,因此不需要付出太多的维护成本。

相关链接:作者关于 stable 版本的回复 astral-sh/ruff#1992 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. In the chapter 7 scheduling plan, we need to add a plan description for future updates, e.g. three updates expected this year(Jun, Sep, Dec), or updates by version, v0.1.0 update once, v0.2.0 update again

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor

@jeff41404 jeff41404 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants