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 22] enable Ruff C417 rule in python/paddle/base #57634

Merged
merged 3 commits into from
Sep 25, 2023

Conversation

zade23
Copy link
Contributor

@zade23 zade23 commented Sep 22, 2023

PR types

Others

PR changes

Others

Description

之前的提交 #57611 在检查处理CI提示的冲突之后,不小心删了,所以重新提交一遍0.o

enable Ruff C417 rule in python/paddle/base

Index orgin fixed
~\Paddle\python\paddle\static\nn\control_flow.py out_shape = list(map(lambda a, b: a if a == b else -1, first_shape, second_shape)) out_shape = [a if a == b else -1 for a, b in zip(first_shape, second_shape)]
~\Paddle\test\legacy_test\test_lstm_cudnn_op.py tuple(map(lambda x, y: np.where(mask, x, y), new, old)) tuple(np.where(mask, x, y) for x, y in zip(new, old))
~\Paddle\test\rnn\rnn_numpy.py tuple(map(lambda x, y: np.where(mask, x, y), new, old)) tuple(np.where(mask, x, y) for x, y in zip(new, old))
~\Paddle\python\paddle\base\backward.py list(map(lambda arg: arg.decode() if isinstance(arg, bytes) else arg,args,)) [arg.decode() if isinstance(arg, bytes) else arg for arg in args]

ref:

@gouzil
Copy link
Member

gouzil commented Sep 22, 2023

LGTM, @SigureMo

@paddle-bot paddle-bot bot added the contributor External developers label Sep 22, 2023
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 added the HappyOpenSource 快乐开源活动issue与PR label Sep 25, 2023
@luotao1 luotao1 merged commit c0e5e95 into PaddlePaddle:develop Sep 25, 2023
@zade23 zade23 deleted the Ruff_C417 branch September 25, 2023 02:48
Frida-a pushed a commit to Frida-a/Paddle that referenced this pull request Oct 14, 2023
jiahy0825 pushed a commit to jiahy0825/Paddle that referenced this pull request Oct 16, 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