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

Evaluate the usage of black for more automatic code formatting #781

Closed
mfeurer opened this issue Sep 13, 2019 · 3 comments
Closed

Evaluate the usage of black for more automatic code formatting #781

mfeurer opened this issue Sep 13, 2019 · 3 comments
Assignees

Comments

@mfeurer
Copy link
Collaborator

mfeurer commented Sep 13, 2019

https://pypi.org/project/black/

@PGijsbers
Copy link
Collaborator

I've been using black in GAMA now since a few weeks. The experience has been good so far. I also took the time to set up a pre-commit hook. Before doing any commit (locally), it will run black, mypy and flake8. The pre-commit has a few benefits:

  • You don't have to call black manually, so it can't be forgotten.
  • You won't have check-ins with flake8 and mypy errors, which means also no commits that are just "Fix Flake8/mypy". Keeps a cleaner commit history and puts less strain on CI servers.
  • If we add configuration files for each of those packages, alongside the pre-commit configuration, everyone runs the same version of the packages with the same configurations. There will be no need for manual setup beyond pre-commit install.

Thoughts?

It shouldn't take a long time to set up, and I'm willing to do that. But I won't have time for it until sometime in May.

@mfeurer
Copy link
Collaborator Author

mfeurer commented Apr 20, 2020

Thoughts?

That sounds great.

I'm willing to do that.

That's great, too :)

But I won't have time for it until sometime in May.

Fine by me, I guess most of us are busy with the TPAMI SI anyway.

@PGijsbers PGijsbers self-assigned this Apr 20, 2020
@mfeurer
Copy link
Collaborator Author

mfeurer commented Jul 6, 2020

This was added in #922

@mfeurer mfeurer closed this as completed Jul 6, 2020
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