-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Manage black version using requirement file #1748
Changes from 5 commits
b7c9e76
64181eb
55ed626
c7725ed
12dd9df
8b54fa7
67591ba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
# https://pre-commit.com/#repository-local-hooks | ||
repos: | ||
- repo: https://github.com/python/black | ||
rev: 19.3b0 | ||
hooks: | ||
- id: black | ||
language_version: python3.7 | ||
exclude_types: ['markdown', 'ini', 'toml', 'rst'] | ||
- repo: local | ||
hooks: | ||
- id: black | ||
name: black | ||
entry: black | ||
language: system | ||
types: [python] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,9 @@ dev: test | |
# Verifications to run before sending a pull request | ||
pr: black-check init dev | ||
|
||
# Verifications to run before sending a pull request, skipping black check because black requires Python 3.6+ | ||
pr2.7: init dev | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: assuming existing code is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When we run CI, there are multiple env including Python2.7, 3.6, 3.7 and 3.8. The code style will be checked in Python3 .X though. Here we just skip the check in one of the env, I think it should be ok 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FYI, why the old way (download black binary directly) won't work: |
||
|
||
define HELP_MESSAGE | ||
|
||
Usage: $ make [TARGETS] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,6 @@ requests>=2.20.0 | |
|
||
# CLI requirements | ||
docopt>=0.6.2 | ||
|
||
# formatter | ||
black==20.8b1; python_version >= '3.6' |
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.
Nice, good to get rid of this 😩