-
Notifications
You must be signed in to change notification settings - Fork 7
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
Consistent code style #62
Comments
Should we maybe also build an Action to check linting? |
👍 |
Formatted according to black and added actions for black linting and sphinx-lint |
@MarJMue Shall we enforce pylint as pre-commit hook and GitHub action? |
I am not really sure. I think pylint has a lot going for it, but as you said there are a more then a few false positives and I do not like to add even more comment based command in the source code, e.g. before every single character variable taken from literature. Maybe if we disable a few selected warnings... |
Yes, I think we should disable some warnings globally and add the short names to the |
I added a pylintrc and we now support the regex pattern |
Looks really good. But i will still try to remove any unnecessary uses of single character variables, while writing more documentation. |
Yes, I think it's generally good to try to still follow the general naming style. But there really are plenty of variable names which are just naturally written in another style in physics which I would not want to break (e.g. Eg). I still have to refine the regex pattern as well, e.g. we should allow underscores in the beginning for attributes to mark them as "private". But I at some point I will sit down and go through the pylinting issues and try to fix them and then we can introduce an action for checking it. |
Run all subfiles through a linter and an formatter, to get a consistent style.
Part of the code is already formatted with black, so it should be used everywhere.
The text was updated successfully, but these errors were encountered: