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][Ruff][BUAA][G-[59-67]] Fix ruff RUF005 diagnostic for 9 files in python/paddle #67282

Merged
merged 26 commits into from
Aug 13, 2024

Conversation

Fripping
Copy link
Contributor

@Fripping Fripping commented Aug 9, 2024

PR Category

User Experience

PR Types

Devs

Description

修复如下文件 RUF005 的 Ruff 规则:

  • python/paddle/nn/functional/loss.py
  • python/paddle/nn/functional/pooling.py
  • python/paddle/nn/layer/conv.py
  • python/paddle/nn/layer/loss.py
  • python/paddle/nn/layer/rnn.py
  • python/paddle/optimizer/asgd.py
  • python/paddle/quantization/imperative/qat.py
  • python/paddle/sparse/nn/layer/conv.py
  • python/paddle/static/input.py

Related links

Copy link

paddle-bot bot commented Aug 9, 2024

你的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.

@paddle-bot paddle-bot bot added the contributor External developers label Aug 9, 2024
@SigureMo SigureMo changed the title [CodeStyle][Ruff][BUAA][G59-G67] Fix ruff RUF005 diagnostic for 9 files in python/paddle [CodeStyle][Ruff][BUAA][G[59-67]] Fix ruff RUF005 diagnostic for 9 files in python/paddle Aug 9, 2024
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.

这个 PR 和 #67261 有啥区别?都写着改了 9 个文件,但实际上都改了 18 个文件,怎么都包含了另一个?需要回退另一个,每个 PR 只包含自己的 9 个

@@ -233,7 +234,8 @@ def __init__(
)

# the sparse conv restricts the shape is [H, W, in_channels, out_channels]
filter_shape = self._kernel_size + [
filter_shape = [
self._kernel_size,
Copy link
Member

Choose a reason for hiding this comment

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

明显的错误,怎么不带 * 呢?

@SigureMo SigureMo changed the title [CodeStyle][Ruff][BUAA][G[59-67]] Fix ruff RUF005 diagnostic for 9 files in python/paddle [CodeStyle][Ruff][BUAA][G-[59-67]] Fix ruff RUF005 diagnostic for 9 files in python/paddle Aug 10, 2024
@luotao1 luotao1 added the HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务 label Aug 12, 2024
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 merged commit 8a8cec5 into PaddlePaddle:develop Aug 13, 2024
29 of 30 checks passed
Jeff114514 pushed a commit to Jeff114514/Paddle that referenced this pull request Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants