-
Notifications
You must be signed in to change notification settings - Fork 0
Run black through pre-commit #3
Comments
This would perhaps also fix a recurring confusion: What version of Black are we even running? As per learningequality/kolibri#6004 |
Yup, I tried that first. Black is limited to python 3.6+, so we were unable to use that strategy because some developers run early versions of Python 3. ref: psf/black#585 |
@indirectlylit can developers not be restricted to systems with Python 3.6+? This doesn't pertain their development virtualenv since pre-commit creates its own. The fall-back mode would be that linting is also run in CI, so a PR would still error out if the developer has skipped using pre-commit. |
The pre-commit hook is specified in the official PSF repo and doesn't pin Python 3.6.. but it has to be 3.6+, I suppose. 3.5 hasn't been around for quite a while? https://github.com/psf/black/blob/master/.pre-commit-hooks.yaml |
At the time that seemed like too much to ask, because the version of Ubuntu a few people were running came with 3.5 |
Let's find out :) |
That's my point - we did it this way originally and I got 2 different complaints that things were broken. Specifically, I know @rtibbles ran into this problem. also ref: learningequality/kolibri#5409 |
One of the design features of pre-commit is to create a separate Python environment for the linting tools. This means that Black can run outside of the development environment in some other Python version.
I would like to discuss the potential for replacing the need for this repository with "black through pre-commit", as per their official documentation. For more background on pre-commit, see the exchange here: psf/black#1073
CC: @indirectlylit @ralphiee22
The text was updated successfully, but these errors were encountered: