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

Integrate pep8 for Python code style checking #254

Closed
wangkuiyi opened this issue Oct 26, 2016 · 2 comments
Closed

Integrate pep8 for Python code style checking #254

wangkuiyi opened this issue Oct 26, 2016 · 2 comments
Assignees
Milestone

Comments

@wangkuiyi
Copy link
Collaborator

https://pypi.python.org/pypi/pep8

@wangkuiyi wangkuiyi added this to the 0.8.1 milestone Oct 26, 2016
@QiJune
Copy link
Member

QiJune commented Nov 1, 2016

I find a useful open source tool created by google, yapf https://github.com/google/yapf
pip install yapf will install yapf tool.
This tool provides 4 based style to choose: pep8, google, facebook and chromium.
The style can be find in this link. https://github.com/google/yapf/blob/master/yapf/yapflib/style.py

I make some python code formatting test on currently code on github
Here is a .style.yapf config file created in paddle directory:

[style]
based_on_style = google
indent_width = 4
spaces_before_comment = 4
split_before_logical_operator = true

After run yapf -r -i python/, the python code will be formatted.
But, it brings so much diff and changes our python code format.
Should we format the code right now, or just add a yapf config file?

@reyoung
Copy link
Collaborator

reyoung commented Nov 15, 2016

basically done, closed

@reyoung reyoung closed this as completed Nov 15, 2016
zhhsplendid pushed a commit to zhhsplendid/Paddle that referenced this issue Sep 25, 2019
Meiyim pushed a commit to Meiyim/Paddle that referenced this issue May 21, 2021
thisjiang pushed a commit to thisjiang/Paddle that referenced this issue Oct 28, 2021
gglin001 pushed a commit to graphcore/Paddle-fork that referenced this issue Dec 8, 2021
* enable custom_op

* add rts/amp

* resolved comments
zhoutianzi666 pushed a commit to zhoutianzi666/Paddle that referenced this issue May 23, 2022
qingshui pushed a commit to qingshui/Paddle that referenced this issue Apr 21, 2023
lizexu123 pushed a commit to lizexu123/Paddle that referenced this issue Feb 23, 2024
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

No branches or pull requests

4 participants