-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
Would you consider using code formatters? #191
Comments
I think that is a good idea. Instead of submitting a HUGE PR I prefer if you provide the commands you used so I can run them on my side. |
Rather than using commands, I'll submit a PR with a # Install pre-commit in your repo git hooks so it runs before git commits complete
pre-commit install
# Run all of the pre-commit hooks against all files in the repo
pre-commit run --all I strongly recommend running that I work with pre-commit installed via pipx, but do you want it added as a development dependency? I can add that to |
(I need to turn to work items now but I'll get that PR submitted when I have an opportunity!) |
I've submitted #193, which introduces a pre-commit configuration. I'm closing this issue as my question was answered. |
@LudovicRousseau I'd like to use the following code formatters on the codebase, but want to get your feedback first:
Here's an example of how black will reformat the code in
ATR.py
:Here's an example of how isort will sort imports in
setup.py
:Here's an example of how pyupgrade will update the code idioms in
Exceptions.py
:If this looks acceptable to you, I'll submit a PR that introduces a pre-commit configuration with these tools enabled.
I will strongly recommend enabling pre-commit.ci for this repo, which will have the added benefit that incoming PRs will automatically be checked for conformance with the code formatter rules. If the tools detect deviations, pre-commit.ci will update the PR with an additional commit that fixes the issue(s).
The text was updated successfully, but these errors were encountered: