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

Blacken code #29

Open
4 tasks
clbarnes opened this issue Oct 29, 2018 · 1 comment
Open
4 tasks

Blacken code #29

clbarnes opened this issue Oct 29, 2018 · 1 comment

Comments

@clbarnes
Copy link
Collaborator

clbarnes commented Oct 29, 2018

https://github.com/ambv/black

To do:

  • Set the stage by blackening everything in one fell swoop
  • Add black to dev requirements
  • Add black --check . to the tox config for python 3.6+
  • Add pre-commit hook for running black in appropriate environments and warning users developing in an inappropriate environment

While we're at it, make lint can go in the pre-commit hooks too, if the CI's going to fail on it.

@clbarnes
Copy link
Collaborator Author

Shell one-liner to see if python is modern enough to run black

python -c "import platform, sys; sys.exit(tuple(int(v) for v in platform.python_version().split('.')) < (3,6))"

N.B. probably better to just have pip install black where appropriate and then have make lint do black && black --check .

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

1 participant