-
Notifications
You must be signed in to change notification settings - Fork 1
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
Linting and code formatting #131
Comments
Sounds useful, I would suggest to discuss this at the next PROTEUS meeting on Monday; it would be good if you could describe a bit what steps and changes this would induce. |
I agree that we need to have something like this going forward, as more people are working on the code. I am particularly a fan of implementing more typed code. A maximum line length also makes sense, but may I also suggest a larger limit of 92 chars rather than 79? |
In addition, we should discuss what kind of naming style is appropriate for variables, functions, etc. The PEP doesn't specify a single style in particular. The predominant style in the current code is CamelCase, with a few exceptions. |
The standard is CamelCase for classes and snake_case for methods, functions, and variables. Globals in UPPERCASE. See: https://peps.python.org/pep-0008/#descriptive-naming-styles And +1 for 92 or perhaps even larger for line length. |
Current state of the code:
Undefined name is somewhat worrying, but seems to be a side-effect of #138 |
Hi all, just noticed that I pushed a bunch of commits to master by accident that addresses this issue, just so you know. I can't undo it because of branch protection, but I will fix remaining issues next week. Sorry about that. |
How did this work in the first place? |
No idea, I forgot to ceate a branch so I committed to master (locally) instead and pushed that 😅 It also struck me that it's kind of odd that the branch protection does not protect against that. I tried to undo and force push the previous state, but that actually is forbidden. Best I can do is revert the changes in a new commit and then push that. Just messes up the history a bit. |
Do we have the setting 'Do not allow bypassing' turned on? |
It is turned off. Should we turn it on? |
Good for me now that every repo has 4 admins. |
Hi all, I'm wondering what is your opinion on code formatting and linting. I think PROTEUS and some of the other submodules would really benefit from some linting.
I personally find ruff to be a great tool for linting, formatting, and import sorting. Let me know what you think.
The text was updated successfully, but these errors were encountered: