Skip to content

Conversation

betterpig
Copy link
Contributor

@betterpig betterpig commented May 23, 2022

PR types

Others

PR changes

Others

Describe

use yapf of 0.32.0 to format all python file.
some points:

  • change the repo of yapf to google/yapf , since there is no need to use mirrors-yapf, which cant set version easily unless update the repo first. And the two of them have nothing different except that.
  • exclude two unittests file of "dygraph to static" for they rely on writing and reading file, and format will break them

Pasted Graphic

M4 IBISE ARerE Ltrar HOIM CNFSIAIBPIBe Vveorce cod

- temporarily dissable using git to find out diff python files in check_diff_file_for_coverage, for the diff_py_files is too many that cause the shell script cant execute successfully.

Pasted Graphic 8

@paddle-bot-old
Copy link

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

@betterpig betterpig changed the title 【no merge】yapf 0.32.0 format results 【code format check upgrade】 step2:yapf Jun 2, 2022
@luotao1
Copy link
Contributor

luotao1 commented Jun 4, 2022

paddle_build.sh是因为修改的文件太多,所以先做修改,等PR merge后再revert么?

@luotao1
Copy link
Contributor

luotao1 commented Jun 4, 2022

static-check也卡住了,paddle_build.sh对git diff的修改,不仅要修改coverage流水线相关的,还需要修改static-check流水线相关的。也可以先豁免等这个PR merge后,revert paddle_build.sh的修改

@betterpig
Copy link
Contributor Author

paddle_build.sh是因为修改的文件太多,所以先做修改,等PR merge后再revert么?

static-check也卡住了,paddle_build.sh对git diff的修改,不仅要修改coverage流水线相关的,还需要修改static-check流水线相关的。也可以先豁免等这个PR merge后,revert paddle_build.sh的修改

我觉得可以先merge了,yapf的合入不会对static_check造成影响。等合入后,我再提个PR改回来。就是改了检查python文件覆盖率的功能,先合入再马上改回来,影响很小。

Copy link
Contributor

@luotao1 luotao1 left a comment

Choose a reason for hiding this comment

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

LGTM

@luotao1 luotao1 merged commit a072fca into PaddlePaddle:develop Jun 5, 2022
fuyou765 pushed a commit to fuyou765/Paddle that referenced this pull request Jun 7, 2022
* use yapf to format all python file

* yapf exclude two unittests file for they rely on writing and reading file, and format will break them

* disable diff_py_file because too many diff files cause command following failed
@betterpig betterpig deleted the yapf branch June 8, 2022 06:26
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