-
Notifications
You must be signed in to change notification settings - Fork 16
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
add formatting and linting #139
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is appreciated and the concept is good.
Out of curiosity, do you have rationale behind the choices of applications? Particularly interested in why you chose Black and Pylint versus any other available options.
I chose Black and Pylint because of their popularity, support, and ruleset. Black and Pylint are probably the more popular and more supported code formatters and linters, and this is helpful when it comes to IDE integrations with VSCode and PyCharm as you can see linter violations directly in your IDE based on the linter rules you have set/unset. Black also contains a superset of the normal PEP 8 python code format standard. There is also just how mature they are, these are relatively mature tools compared to newcomers like Ruff, and that is useful because we don't want our code formatters and linters to break or have breaking changes. This decision is purely opinion-based, and it is relatively easy to switch to a different code formatter or linter if we want to. |
Thank you for the explanation, it is much appreciated. Once the environment_dev.yml is added and used in CI, I will approve this PR. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! black and pylint worked with my setup.
Thanks!
This PR adds linting using Pylint and formatting using Black, and adds a GitHub Actions workflow to check linting and formatting on each new push or PR. This is functionally optional, but sets a guideline for formatting so there aren't any formatting conflicts or code smells.
Changes
black .
.pylint <module>
.Testing