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

enforce PEP8 style with a tool such as pylint or autopep8 #122

Open
dlyongemallo opened this issue Jul 30, 2023 · 4 comments
Open

enforce PEP8 style with a tool such as pylint or autopep8 #122

dlyongemallo opened this issue Jul 30, 2023 · 4 comments

Comments

@dlyongemallo
Copy link
Contributor

Is there any reason not to enforce PEP8 (or any style, as long as it's consistent) on the code? It would make using certain development tasks, such as searching with something using regular expressions, somewhat easier.

@dlyongemallo
Copy link
Contributor Author

(Would anyone seriously object if I started sending PRs to better align the code with PEP8 recommendations?)

@jvdwetering
Copy link
Collaborator

I'm a little against touching code that doesn't need to be touched, but not very strongly. If you want to put in the time to make it follow the convention, then go ahead. Although I do think that the restriction to 80 character long lines is too strict. On the other hand, if a line is that long that might be a sign that the code needs to be refactored to just not be that long.

@dlyongemallo
Copy link
Contributor Author

Just out of curiosity, what development environment (OS, IDE, etc.) do the main contributors to this codebase (and, incidentally, zxlive) use? I'm mainly using PyCharm in Linux, but I also have access to Windows and VS Code. With modern IDEs there are a number of nice features like detecting common errors and suggested refactorings which implicitly depend on PEP8 style (e.g., because they use regular expression matching).

A unified style also makes code easier to read, e.g., if not b in list_of_bools can be easily misunderstood (the recommended style is if b not in list_of_bools).

@jvdwetering
Copy link
Collaborator

I don't know about the other contributors, but I wrote most of this code in Sublime, although I have now semi-switched to Visual Studio.

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

2 participants