-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
chore: Fix inconsistent black version in precommit #2314
Conversation
.pre-commit-config.yaml
Outdated
@@ -1,6 +1,6 @@ | |||
repos: | |||
- repo: https://github.com/python/black | |||
rev: 19.3b0 | |||
rev: 19.10b0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest is 20.8b1 of black. Should we upgrade to that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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! |
|
||
# formatter | ||
black==20.8b1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you explain a bit what the new changes are?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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-reqs
Checklist:
make pr
passesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.