You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While making changes for #908#906 I noticed that we are using pre-commit hook for Black which is fetched from their Github repo.
If we want to stick to a single version of black we can use a local dependency instead in .pre-commit-config.yaml
- repo: local
hooks:
- id: black
name: black
description: 'Black: The uncompromising Python code formatter'
entry: black
language: python
language_version: python3
require_serial: true
types: [python]
additional_dependencies: ['black==19.3b0']
Though this requires running pip install black running before this.
A better option will be to create a fork for their current repo and use it for the future - which can be done by just changing the git remote to the new one .pre-commit-config.yaml.
They have not updated the documentation about this. But you can read more about this here
The text was updated successfully, but these errors were encountered:
Thanks so much for digging in to this. It's kind of surprising that we haven't had more black compatibility questions before this!
You're welcome!
I think it will be much better if use a particular Python package from https://pypi.org/project/black/ or create a fork of their current repo. This way our black tests won't fail. We can timely update the pre-hook to the stable version by rebasing the fork. And if we just use pip install black we will always point to the stable version from Pypi
While making changes for #908 #906 I noticed that we are using pre-commit hook for Black which is fetched from their Github repo.
If we want to stick to a single version of black we can use a local dependency instead in .pre-commit-config.yaml
Though this requires running
pip install black
running before this.A better option will be to create a fork for their current repo and use it for the future - which can be done by just changing the git remote to the new one .pre-commit-config.yaml.
They have not updated the documentation about this. But you can read more about this here
The text was updated successfully, but these errors were encountered: