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

[CodeStyle][task 5] Enable Ruff PLR1701 rule in python/paddle/ and test/ #57391

Merged

Conversation

linzeyang
Copy link
Contributor

PR types

Bug fixes

PR changes

Others

Description

This PR comes after the idea in #57367.

The purpose is to activate Ruff's PLR1701 check.

Ruff version: 0.0.289

What I've done:

  1. Uncomment "PLR1701", line in pyproject.toml
  2. Take advantage of Ruff to identify and automatically fix relevant violations.
  3. Make sure no PLR1701 violation is found after the fix.
  4. Adjust one line to accomedate black hook (python/paddle/base/layers/layer_function_generator.py)
  5. Make sure all local pre-commit hooks pass/skip

@gouzil

@paddle-bot
Copy link

paddle-bot bot commented Sep 15, 2023

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@gouzil
Copy link
Member

gouzil commented Sep 16, 2023

LGTM @SigureMo

Copy link
Member

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

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

LGTMeow 🐾

@SigureMo SigureMo changed the title [CodeStyle][task 5] Enable Ruff PLR1701 rule in python/paddle/ and test/ [CodeStyle][task 5] Enable Ruff PLR1701 rule in python/paddle/ and test/ Sep 16, 2023
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Sep 18, 2023
@luotao1 luotao1 merged commit d476117 into PaddlePaddle:develop Sep 18, 2023
@luotao1
Copy link
Contributor

luotao1 commented Sep 18, 2023

hi, @linzeyang

  • 非常感谢你对飞桨框架的贡献,我们正在运营一个PFCC组织,会通过定期分享技术知识与发布开发者主导任务的形式持续为飞桨框架做贡献,详情可见 https://github.com/luotao1 主页说明。
  • 如果你对PFCC有兴趣,请发送邮件至 [email protected],我们会邀请你加入~

@linzeyang linzeyang deleted the CodeStyle/task-5-ruff-PLR1701 branch September 18, 2023 04:00
Frida-a pushed a commit to Frida-a/Paddle that referenced this pull request Oct 14, 2023
danleifeng pushed a commit to danleifeng/Paddle that referenced this pull request Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants