Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 314f8cf

Browse files
Update Prettier pre-commit configuration (#4662)
* Update Prettier configuration Signed-off-by: cobalt <[email protected]> * Update .github/workflows/diff_shades.yml Co-authored-by: Jelle Zijlstra <[email protected]> --------- Signed-off-by: cobalt <[email protected]> Co-authored-by: Jelle Zijlstra <[email protected]>
1 parent d0ff3bd commit 314f8cf

File tree

6 files changed

+35
-33
lines changed

6 files changed

+35
-33
lines changed

.github/workflows/diff_shades.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ jobs:
3434
env:
3535
GITHUB_TOKEN: ${{ github.token }}
3636
run: >
37-
python scripts/diff_shades_gha_helper.py config ${{ github.event_name }} ${{ matrix.mode }}
37+
python scripts/diff_shades_gha_helper.py config ${{ github.event_name }}
38+
${{ matrix.mode }}
3839
3940
analysis:
4041
name: analysis / ${{ matrix.mode }}
@@ -48,7 +49,7 @@ jobs:
4849
strategy:
4950
fail-fast: false
5051
matrix:
51-
include: ${{ fromJson(needs.configure.outputs.matrix )}}
52+
include: ${{ fromJson(needs.configure.outputs.matrix) }}
5253

5354
steps:
5455
- name: Checkout this repository (full clone)
@@ -130,10 +131,9 @@ jobs:
130131
- name: Generate summary file (PR only)
131132
if: github.event_name == 'pull_request' && matrix.mode == 'preview-changes'
132133
run: >
133-
python helper.py comment-body
134-
${{ matrix.baseline-analysis }} ${{ matrix.target-analysis }}
135-
${{ matrix.baseline-sha }} ${{ matrix.target-sha }}
136-
${{ github.event.pull_request.number }}
134+
python helper.py comment-body ${{ matrix.baseline-analysis }}
135+
${{ matrix.target-analysis }} ${{ matrix.baseline-sha }}
136+
${{ matrix.target-sha }} ${{ github.event.pull_request.number }}
137137
138138
- name: Upload summary file (PR only)
139139
if: github.event_name == 'pull_request' && matrix.mode == 'preview-changes'

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ repos:
6464
args: ["--python-version=3.10"]
6565
additional_dependencies: *mypy_deps
6666

67-
- repo: https://github.com/pre-commit/mirrors-prettier
68-
rev: v4.0.0-alpha.8
67+
- repo: https://github.com/rbubley/mirrors-prettier
68+
rev: v3.5.3
6969
hooks:
7070
- id: prettier
71-
types_or: [css, javascript, html, json, yaml]
71+
types_or: [markdown, yaml, json]
7272
exclude: \.github/workflows/diff_shades\.yml
7373

7474
- repo: https://github.com/pre-commit/pre-commit-hooks

CHANGES.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@
99
### Stable style
1010

1111
<!-- Changes that affect Black's stable style -->
12+
1213
- Fix crash while formatting a long `del` statement containing tuples (#4628)
13-
- Fix crash while formatting expressions using the walrus operator in complex
14-
`with` statements (#4630)
14+
- Fix crash while formatting expressions using the walrus operator in complex `with`
15+
statements (#4630)
1516
- Handle `# fmt: skip` followed by a comment at the end of file (#4635)
16-
- Fix crash when a tuple appears in the `as` clause of a `with` statement
17-
(#4634)
17+
- Fix crash when a tuple appears in the `as` clause of a `with` statement (#4634)
1818
- Fix crash when tuple is used as a context manager inside a `with` statement (#4646)
1919

2020
### Preview style
2121

2222
<!-- Changes that affect Black's preview style -->
2323

24-
- Fix a bug where one-liner functions/conditionals marked with `# fmt: skip`
25-
would still be formatted (#4552)
24+
- Fix a bug where one-liner functions/conditionals marked with `# fmt: skip` would still
25+
be formatted (#4552)
2626

2727
### Configuration
2828

@@ -37,8 +37,8 @@
3737
<!-- Changes to the parser or to version autodetection -->
3838

3939
- Rewrite tokenizer to improve performance and compliance (#4536)
40-
- Fix bug where certain unusual expressions (e.g., lambdas) were not accepted
41-
in type parameter bounds and defaults. (#4602)
40+
- Fix bug where certain unusual expressions (e.g., lambdas) were not accepted in type
41+
parameter bounds and defaults. (#4602)
4242

4343
### Performance
4444

@@ -57,8 +57,8 @@
5757
<!-- For example, Docker, GitHub Actions, pre-commit, editors -->
5858

5959
- Fix the version check in the vim file to reject Python 3.8 (#4567)
60-
- Enhance GitHub Action `psf/black` to read Black version from an additional
61-
section in pyproject.toml: `[project.dependency-groups]` (#4606)
60+
- Enhance GitHub Action `psf/black` to read Black version from an additional section in
61+
pyproject.toml: `[project.dependency-groups]` (#4606)
6262

6363
### Documentation
6464

@@ -69,24 +69,25 @@
6969

7070
### Highlights
7171

72-
This release introduces the new 2025 stable style (#4558), stabilizing
73-
the following changes:
72+
This release introduces the new 2025 stable style (#4558), stabilizing the following
73+
changes:
7474

7575
- Normalize casing of Unicode escape characters in strings to lowercase (#2916)
7676
- Fix inconsistencies in whether certain strings are detected as docstrings (#4095)
7777
- Consistently add trailing commas to typed function parameters (#4164)
7878
- Remove redundant parentheses in if guards for case blocks (#4214)
7979
- Add parentheses to if clauses in case blocks when the line is too long (#4269)
8080
- Whitespace before `# fmt: skip` comments is no longer normalized (#4146)
81-
- Fix line length computation for certain expressions that involve the power operator (#4154)
81+
- Fix line length computation for certain expressions that involve the power operator
82+
(#4154)
8283
- Check if there is a newline before the terminating quotes of a docstring (#4185)
8384
- Fix type annotation spacing between `*` and more complex type variable tuple (#4440)
8485

8586
The following changes were not in any previous release:
8687

8788
- Remove parentheses around sole list items (#4312)
88-
- Generic function definitions are now formatted more elegantly: parameters are
89-
split over multiple lines first instead of type parameter definitions (#4553)
89+
- Generic function definitions are now formatted more elegantly: parameters are split
90+
over multiple lines first instead of type parameter definitions (#4553)
9091

9192
### Stable style
9293

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ SQLAlchemy, Poetry, PyPA applications (Warehouse, Bandersnatch, Pipenv, virtuale
137137
pandas, Pillow, Twisted, LocalStack, every Datadog Agent Integration, Home Assistant,
138138
Zulip, Kedro, OpenOA, FLORIS, ORBIT, WOMBAT, and many more.
139139

140-
The following organizations use _Black_: Dropbox, KeepTruckin, Lyft, Mozilla,
141-
Quora, Duolingo, QuantumBlack, Tesla, Archer Aviation.
140+
The following organizations use _Black_: Dropbox, KeepTruckin, Lyft, Mozilla, Quora,
141+
Duolingo, QuantumBlack, Tesla, Archer Aviation.
142142

143143
Are we missing anyone? Let us know.
144144

docs/contributing/release_process.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ frequently than monthly nets rapidly diminishing returns.
2929
**You must have `write` permissions for the _Black_ repository to cut a release.**
3030

3131
The 10,000 foot view of the release process is that you prepare a release PR and then
32-
publish a [GitHub Release]. This triggers [release automation](#release-workflows) that builds
33-
all release artifacts and publishes them to the various platforms we publish to.
32+
publish a [GitHub Release]. This triggers [release automation](#release-workflows) that
33+
builds all release artifacts and publishes them to the various platforms we publish to.
3434

3535
We now have a `scripts/release.py` script to help with cutting the release PRs.
3636

@@ -96,8 +96,9 @@ In the end, use your best judgement and ask other maintainers for their thoughts
9696

9797
## Release workflows
9898

99-
All of _Black_'s release automation uses [GitHub Actions]. All workflows are therefore configured
100-
using YAML files in the `.github/workflows` directory of the _Black_ repository.
99+
All of _Black_'s release automation uses [GitHub Actions]. All workflows are therefore
100+
configured using YAML files in the `.github/workflows` directory of the _Black_
101+
repository.
101102

102103
They are triggered by the publication of a [GitHub Release].
103104

docs/integrations/github_actions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ the `pyproject.toml` file. `version` can be any
3838
or just the version number if you want an exact version. To read the version from the
3939
`pyproject.toml` file instead, set `use_pyproject` to `true`. This will first look into
4040
the `tool.black.required-version` field, then the `dependency-groups` table, then the
41-
`project.dependencies` array and finally the `project.optional-dependencies` table.
42-
The action defaults to the latest release available on PyPI. Only versions available
43-
from PyPI are supported, so no commit SHAs or branch names.
41+
`project.dependencies` array and finally the `project.optional-dependencies` table. The
42+
action defaults to the latest release available on PyPI. Only versions available from
43+
PyPI are supported, so no commit SHAs or branch names.
4444

4545
If you want to include Jupyter Notebooks, _Black_ must be installed with the `jupyter`
4646
extra. Installing the extra and including Jupyter Notebook files can be configured via

0 commit comments

Comments
 (0)