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] update ruff config with # style to reduce conflicts #52019

Merged

Conversation

SigureMo
Copy link
Member

@SigureMo SigureMo commented Mar 23, 2023

PR types

Others

PR changes

Others

Describe

更改 Ruff 配置以尽可能降低冲突的概率(Pylint 的因为优先级较低,而且每个都需要仔细判断,因此暂时先不改)

本 PR 引入了以下的无存量 rules:

  • B002 unary-prefix-increment 语法错误,可以引入
  • B003 assignment-to-os-environ 明显的错误,可以引入
  • B012 jump-statement-in-finally 明显的错误,可以引入
  • B013 redundant-tuple-in-exception-handler 删除异常捕获时不必要的括号,可让代码更加简洁,可以引入,可以引入自动修复
  • B014 duplicate-handler-exception 移除异常捕获时重复的异常,可让代码更加简洁,可以引入,可以引入自动修复
  • B018 useless-expression 无用的表达式,可减少冗余代码,可以引入
  • B019 cached-instance-method 明显的 bug,可以引入
  • B021 f-string-docstring f-string 不会被认为是一个 docstring,可以引入
  • B022 useless-contextlib-suppress 明显的错误用法,可以引入
  • B025 duplicate-try-block-exception 冗余的异常捕获分支,可能会导致部分分支从未被访问,可以引入
  • B029 except-with-empty-tuple 明显的错误用法,可以引入
  • B032 unintentional-type-annotation 明显的错误用法,可以引入

Related links

@paddle-bot
Copy link

paddle-bot bot commented Mar 23, 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.

@luotao1 luotao1 merged commit 2142326 into PaddlePaddle:develop Mar 23, 2023
@SigureMo SigureMo deleted the ruff/config/update-with-comment-style branch March 23, 2023 11:06
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.

2 participants