chore: Fix inconsistent black version in precommit - #2314
Conversation
| repos: | ||
| - repo: https://github.com/python/black | ||
| rev: 19.3b0 | ||
| rev: 19.10b0 |
There was a problem hiding this comment.
Latest is 20.8b1 of black. Should we upgrade to that?
There was a problem hiding this comment.
Good point. In addition, I made a few changes to how we install black and sync appveyor as well. Waiting for AppVeyor's check.
2cf8c85 to
1e7b001
Compare
|
The black's pre-commit-config.yaml is taken from https://github.com/psf/black/blob/master/.pre-commit-config.yaml |
|
This PR proposes a change on how we install black, I would like to get more feedbacks, thanks! |
| pytest-rerunfailures==7.0 | ||
|
|
||
| # formatter | ||
| black==20.8b1 No newline at end of file |
There was a problem hiding this comment.
I like that we have this effectively defined, instead of relying on user to have a version of black installed. This has caused conflicts in the past, with files being formatted with different versions of black.
| - id: black | ||
| language_version: python3.7 | ||
| exclude_types: ['markdown', 'ini', 'toml'] | ||
| - repo: local |
There was a problem hiding this comment.
could you explain a bit what the new changes are?
There was a problem hiding this comment.
The black's pre-commit-config.yaml is taken from https://github.com/psf/black/blob/master/.pre-commit-config.yaml
c8d1987 to
76c0c38
Compare
|
(just did a rebase on latest upstream/develop) |
hoffa
left a comment
There was a problem hiding this comment.
LGTM 👍 Big improvement versus having versions scattered around!
76c0c38 to
7c27ade
Compare
5f763bc to
7d01ac8
Compare
|
Just did a rebase and update the dev guide with a workaround how to configure black in IDE. |
Issue #, if available:
Why is this change necessary?
to make black version consistent with appveyor and dev guide. Even better, by only specifying black version in one place , we can reduce our maintenance cost.
How does it address the issue?
make init)What side effects does this change have?
Did you change a dependency in
requirements/base.txt?If so, did you run
make update-reproducible-reqsChecklist:
make prpassesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.