mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 10:11:06 +01:00
Update pre-commit versions and fix black break (#160)
Caught by black stable change, done by `pre-commit autoupdate` `pre-commit autoupdate` also wanted to update pre-commit-hooks, but that gave me some pyenv errors so I'm leaving it alone for now.
This commit is contained in:
@@ -41,12 +41,12 @@ repos:
|
||||
pass_filenames: false
|
||||
# Formatters should be run late so that they can re-format any prior changes.
|
||||
- repo: https://github.com/psf/black
|
||||
rev: stable
|
||||
rev: 20.8b1
|
||||
hooks:
|
||||
- id: black
|
||||
language_version: python3
|
||||
- repo: https://github.com/prettier/prettier
|
||||
rev: 2.0.5
|
||||
rev: 2.1.1
|
||||
hooks:
|
||||
- id: prettier
|
||||
exclude: ^src/jekyll/theme/
|
||||
|
||||
+19
-18
@@ -618,18 +618,19 @@ Cons:
|
||||
|
||||
In a workflow where there's always a tracking issue:
|
||||
|
||||
1. Create the tracking issue, e.g. #123.
|
||||
2. Create the PR, e.g. #456, naming the proposal p0123.md after the tracking
|
||||
issue.
|
||||
1. Create the tracking issue, e.g. #123.
|
||||
2. Create the PR, e.g. #456, naming the proposal p0123.md after the tracking
|
||||
issue.
|
||||
1. Use GitHub features to link #123 and #456.
|
||||
3. Update the status in p0123.md and labels of #123 when progressing a proposal.
|
||||
4. When a decision is made, create a new PR, e.g. #789, containing the decision
|
||||
p0123-decision.md.
|
||||
2. This does not replace the Discourse Forum topic announcing a decision.
|
||||
3. Use GitHub features to link #123 and #789.
|
||||
4. Comments on the decision may go on the decision PR, similar to the
|
||||
3. Update the status in p0123.md and labels of #123 when progressing a
|
||||
proposal.
|
||||
4. When a decision is made, create a new PR, e.g. #789, containing the decision
|
||||
p0123-decision.md.
|
||||
1. This does not replace the Discourse Forum topic announcing a decision.
|
||||
2. Use GitHub features to link #123 and #789.
|
||||
3. Comments on the decision may go on the decision PR, similar to the
|
||||
proposal PR discussion.
|
||||
5. Declined/deferred proposals may be committed or not; it doesn't matter.
|
||||
5. Declined/deferred proposals may be committed or not; it doesn't matter.
|
||||
|
||||
Pros:
|
||||
|
||||
@@ -646,17 +647,17 @@ Cons:
|
||||
In a workflow where there's no need for a tracking issue (although contributors
|
||||
may create them for bucketing work, they are non-essential):
|
||||
|
||||
1. Create the PR, e.g. #456, naming the proposal p0456.md.
|
||||
2. Update the labels of #456 when progressing a proposal.
|
||||
1. Create the PR, e.g. #456, naming the proposal p0456.md.
|
||||
2. Update the labels of #456 when progressing a proposal.
|
||||
1. Don't bother putting the status in p0456.md: people should rely on the PR
|
||||
labels since it's in the same place.
|
||||
3. When a decision is made, add it as a comment to #456.
|
||||
2. This does not replace the Discourse Forum topic announcing a decision.
|
||||
3. Comments on the decision should go in Discourse Forums.
|
||||
4. The author is asked to link to the decision in p0456.md before the commit
|
||||
3. When a decision is made, add it as a comment to #456.
|
||||
1. This does not replace the Discourse Forum topic announcing a decision.
|
||||
2. Comments on the decision should go in Discourse Forums.
|
||||
3. The author is asked to link to the decision in p0456.md before the commit
|
||||
is approved.
|
||||
4. If declined/deferred proposals are committed, it would be best to add a
|
||||
status in p0456.md before committing.
|
||||
4. If declined/deferred proposals are committed, it would be best to add a
|
||||
status in p0456.md before committing.
|
||||
|
||||
Pros:
|
||||
|
||||
|
||||
@@ -36,7 +36,9 @@ def _parse_args(args=None):
|
||||
"specified title."
|
||||
)
|
||||
parser.add_argument(
|
||||
"title", metavar="TITLE", help="The title of the proposal.",
|
||||
"title",
|
||||
metavar="TITLE",
|
||||
help="The title of the proposal.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--branch",
|
||||
|
||||
@@ -292,8 +292,7 @@ def _parse_args(args=None):
|
||||
|
||||
|
||||
def _query(parsed_args, field_name=None):
|
||||
"""Returns a query for the given field, or all fields if none are specified.
|
||||
"""
|
||||
"""Returns a query for the given field, or all fields if none are specified."""
|
||||
print(".", end="", flush=True)
|
||||
format = {
|
||||
"pr_num": parsed_args.pr_num,
|
||||
|
||||
@@ -191,7 +191,9 @@ class TestPRComments(unittest.TestCase):
|
||||
]
|
||||
for thread in review_threads:
|
||||
pr_comments._accumulate_thread(
|
||||
parsed_args, threads_by_path, thread,
|
||||
parsed_args,
|
||||
threads_by_path,
|
||||
thread,
|
||||
)
|
||||
self.assertEqual(sorted(threads_by_path.keys()), ["foo.md", "other.md"])
|
||||
threads = sorted(threads_by_path["foo.md"])
|
||||
@@ -209,7 +211,8 @@ class TestPRComments(unittest.TestCase):
|
||||
|
||||
@staticmethod
|
||||
def fake_pr_comment_dict(
|
||||
body="comment", created_at="2001-02-03T04:05:06Z",
|
||||
body="comment",
|
||||
created_at="2001-02-03T04:05:06Z",
|
||||
):
|
||||
pr_comment_dict = {
|
||||
"author": {"login": "author"},
|
||||
|
||||
Reference in New Issue
Block a user