-
Notifications
You must be signed in to change notification settings - Fork 17
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
Improve code readability with PEP8 Style Guide for Python Code #24
Comments
I do not agree entirely with pep8 rules, the max line length for this project is 120 and the way to split big function calls like: value = function_name(
arg1, arg2
) The commit 6d92bca should fix the majority of this issues |
I merged your changes you committed in 6d92bca. There are still some changes remaining in my pull request. I commented all my changes at I did not touch the migration 0001_initial.py again, since there were no changes in 6d92bca. Let me know, if there is something left for the migration. Some additions regarding pep8 rules: While pep8 helps a lot to gain readability the meaning of it is not to just follow the rules impassively, but to use pep8 to outline the meaning of a particular part of code. So my goal to apply pep8 rules was not to just match some kind of definition, but to understand your code by improving code readability while following pep8. For example, pep8 allows multiple ways to split function calls. If there are function params containing function calls themselves, it is much more readable to split them one by line. For example, it is much more readable to write:
than to have something like this:
or even something like this.
since it is harder to recognize that there are 3 params for foo() in the last ways of coding style (while all versions are valid according pep8). Nevertheless, it would be very helpful to reach a clean code base for me again by getting my pull request accepted, since there are some development branches in my repo for several new features and it is hard work to solve all merges and conflicts that are caused by a split brain. |
https://www.python.org/dev/peps/pep-0008/
The text was updated successfully, but these errors were encountered: