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

Reformat code to PEP 8 standard. #24

Open
eguvep opened this issue Nov 17, 2020 · 4 comments
Open

Reformat code to PEP 8 standard. #24

eguvep opened this issue Nov 17, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@eguvep
Copy link
Member

eguvep commented Nov 17, 2020

A major feature of this GUI is, that it is very easy to extend and to maintain. To further help other potential contributors to understand the code, we should follow the PEP 8 standard more strictly.
https://pep8.org/

@eguvep eguvep added the enhancement New feature or request label Nov 17, 2020
@alexlib
Copy link
Member

alexlib commented Nov 17, 2020

Hi @eguvep I tried to use autopep8 and black and even after that I have to pass manually with the flake8 check again to see all kind of messages of whitespace, missing lines, etc.
Do you have an automatic method? I guess it'll be better to include in github workflow the request for autopep8 or similar.

@eguvep
Copy link
Member Author

eguvep commented Nov 18, 2020

Thanks, Alex, good point! I found a GitHub action that is doing the job. I hope, we now do not end up with a whole bunch of merge conflicts, now, @ErichZimmer...

@eguvep
Copy link
Member Author

eguvep commented Nov 18, 2020

Still, autopep8 just corrects minor format issues like line-length, indention and spaces. All the code style and naming conventions of PEP8 are not touched, of course. We need to have that in mind, every time, we work on the code.

@alexlib
Copy link
Member

alexlib commented Nov 18, 2020

Still, autopep8 just corrects minor format issues like line-length, indention and spaces. All the code style and naming conventions of PEP8 are not touched, of course. We need to have that in mind, every time, we work on the code.

Let's see how people do it in other packages, something not too complex, e.g. a configuration file for the package black that does automatic formatting or maybe something like autopep8 with a given set of rules. Then every change in the code just goes through this filter and comes out slightly reformatted. With time we'll learn how to write better :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants