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 7] enable Ruff UP031 rule in python/paddle/base #57665

Merged
merged 5 commits into from
Sep 26, 2023
Merged

[CodeStyle][task 7] enable Ruff UP031 rule in python/paddle/base #57665

merged 5 commits into from
Sep 26, 2023

Conversation

Kaedeharai
Copy link
Contributor

PR types

Others

PR changes

Others

Description

Related links

@paddle-bot
Copy link

paddle-bot bot commented Sep 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.

@paddle-bot paddle-bot bot added the contributor External developers label Sep 23, 2023
@gouzil
Copy link
Member

gouzil commented Sep 23, 2023

需要再按照 UP032 修一下

ruff check .
python/paddle/base/core.py:50:13: UP032 [*] Use f-string instead of `format` call
python/paddle/base/core.py:199:13: UP032 [*] Use f-string instead of `format` call
python/paddle/base/executor.py:488:16: UP032 [*] Use f-string instead of `format` call
python/paddle/base/executor.py:511:20: UP032 [*] Use f-string instead of `format` call
python/paddle/base/executor.py:2793:20: UP032 [*] Use f-string instead of `format` call
python/paddle/base/framework.py:1879:28: UP032 [*] Use f-string instead of `format` call
python/paddle/base/framework.py:3045:33: UP032 [*] Use f-string instead of `format` call
python/paddle/base/framework.py:3053:33: UP032 [*] Use f-string instead of `format` call
python/paddle/base/framework.py:3099:29: UP032 [*] Use f-string instead of `format` call
python/paddle/base/framework.py:3117:37: UP032 [*] Use f-string instead of `format` call
python/paddle/base/framework.py:7292:28: UP032 [*] Use f-string instead of `format` call
python/paddle/base/trainer_desc.py:239:17: UP032 [*] Use f-string instead of `format` call
python/paddle/base/trainer_desc.py:255:17: UP032 [*] Use f-string instead of `format` call
python/paddle/base/trainer_desc.py:273:17: UP032 [*] Use f-string instead of `format` call

ruff check . --fix就行

@gouzil
Copy link
Member

gouzil commented Sep 24, 2023

其他的风格检测工具没过,需要按照文档配置一下pre-commit

@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Sep 25, 2023
	modified:   python/paddle/base/data_feeder.py
	modified:   python/paddle/base/dygraph/base.py
	modified:   python/paddle/base/executor.py
	modified:   python/paddle/base/framework.py
	modified:   python/paddle/base/layers/layer_function_generator.py
@gouzil
Copy link
Member

gouzil commented Sep 26, 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 🐾

@luotao1 luotao1 merged commit aed3b81 into PaddlePaddle:develop Sep 26, 2023
27 checks passed
@Kaedeharai Kaedeharai deleted the second branch September 26, 2023 08:54
Frida-a pushed a commit to Frida-a/Paddle that referenced this pull request Oct 14, 2023
…dlePaddle#57665)

* delete UP031

* [CodeStyle][task 7] enable Ruff UP031 rule in python/paddle/base

* modified:   python/paddle/base/backward.py
	modified:   python/paddle/base/data_feeder.py
	modified:   python/paddle/base/dygraph/base.py
	modified:   python/paddle/base/executor.py
	modified:   python/paddle/base/framework.py
	modified:   python/paddle/base/layers/layer_function_generator.py
jiahy0825 pushed a commit to jiahy0825/Paddle that referenced this pull request Oct 16, 2023
…dlePaddle#57665)

* delete UP031

* [CodeStyle][task 7] enable Ruff UP031 rule in python/paddle/base

* modified:   python/paddle/base/backward.py
	modified:   python/paddle/base/data_feeder.py
	modified:   python/paddle/base/dygraph/base.py
	modified:   python/paddle/base/executor.py
	modified:   python/paddle/base/framework.py
	modified:   python/paddle/base/layers/layer_function_generator.py
danleifeng pushed a commit to danleifeng/Paddle that referenced this pull request Nov 14, 2023
…dlePaddle#57665)

* delete UP031

* [CodeStyle][task 7] enable Ruff UP031 rule in python/paddle/base

* modified:   python/paddle/base/backward.py
	modified:   python/paddle/base/data_feeder.py
	modified:   python/paddle/base/dygraph/base.py
	modified:   python/paddle/base/executor.py
	modified:   python/paddle/base/framework.py
	modified:   python/paddle/base/layers/layer_function_generator.py
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