Commit Graph

1990 Commits

Author SHA1 Message Date
Tushar Sadhwani
b1c4dd96d7
fix: respect braces better in f-string parsing (#4422) 2024-08-02 09:21:39 -07:00
Jelle Zijlstra
4b4ae43e8b
Fix incorrect linenos on fstring tokens with escaped newlines (#4423)
I don't think this can affect Black itself much (maybe for formatting
ranges), but I ran into this with https://github.com/JelleZijlstra/lib2toast
2024-08-01 11:54:15 -07:00
Kanishk Pachauri
7fa1faf83a
docs: fix the installation command of extra for blackd (#4413) 2024-07-24 21:40:26 -07:00
dependabot[bot]
8827accf56
Bump sphinx from 7.3.7 to 7.4.0 in /docs (#4404)
Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 7.3.7 to 7.4.0.
- [Release notes](https://github.com/sphinx-doc/sphinx/releases)
- [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst)
- [Commits](https://github.com/sphinx-doc/sphinx/compare/v7.3.7...v7.4.0)

---
updated-dependencies:
- dependency-name: sphinx
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-22 07:06:49 -07:00
dependabot[bot]
b0da11d370
Bump furo from 2024.5.6 to 2024.7.18 in /docs (#4409)
Bumps [furo](https://github.com/pradyunsg/furo) from 2024.5.6 to 2024.7.18.
- [Release notes](https://github.com/pradyunsg/furo/releases)
- [Changelog](https://github.com/pradyunsg/furo/blob/main/docs/changelog.md)
- [Commits](https://github.com/pradyunsg/furo/compare/2024.05.06...2024.07.18)

---
updated-dependencies:
- dependency-name: furo
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-22 06:46:59 -07:00
Tushar Sadhwani
721dff5493
fix: avoid formatting backslash strings inside f-strings (#4401) 2024-07-10 19:52:37 -07:00
Oliver Sayers
7e2afc9bfd
Update actions/checkout to v4 to stop node deprecation warnings (#4379) 2024-07-04 16:50:26 -07:00
Shantanu
1ad5263f2f
Bump cibuildwheel to 2.19.2 (#4395)
Fixes #4383, fixes #4381
2024-07-04 16:45:53 -07:00
Shantanu
9ff047a957
Fix wheel build by using newer manylinux image (#4394) 2024-07-04 16:40:28 -07:00
Jelle Zijlstra
5e571ccbbe
Fix use of deprecated ast.Str (#4393) 2024-07-04 16:26:42 -07:00
pre-commit-ci[bot]
978bc505ac
[pre-commit.ci] pre-commit autoupdate (#4392) 2024-07-01 17:18:22 -07:00
dependabot[bot]
b1f7b9f87d
Bump docker/build-push-action from 5 to 6 (#4387)
* Bump docker/build-push-action from 5 to 6

Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-06-25 08:42:06 -07:00
Tushar Sadhwani
b677a643c5
tokenizer: skip lines that are just slash and whitespace (#4343) 2024-06-01 13:01:36 -07:00
dependabot[bot]
8447af4d8d
Bump pypa/cibuildwheel from 2.18.0 to 2.18.1 (#4373)
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.18.0 to 2.18.1.
- [Release notes](https://github.com/pypa/cibuildwheel/releases)
- [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md)
- [Commits](https://github.com/pypa/cibuildwheel/compare/v2.18.0...v2.18.1)

---
updated-dependencies:
- dependency-name: pypa/cibuildwheel
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-01 12:59:53 -07:00
Yilei Yang
9c1fd463e1
Make sure Black doesn't crash when fmt:off is used before a closing paren (#4363) 2024-05-15 20:32:27 -04:00
dependabot[bot]
b9c63230b4
Bump pypa/cibuildwheel from 2.17.0 to 2.18.0 (#4360)
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.17.0 to 2.18.0.
- [Release notes](https://github.com/pypa/cibuildwheel/releases)
- [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md)
- [Commits](https://github.com/pypa/cibuildwheel/compare/v2.17.0...v2.18.0)

---
updated-dependencies:
- dependency-name: pypa/cibuildwheel
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-13 05:32:40 -07:00
dependabot[bot]
4af12c499e
Bump furo from 2024.4.27 to 2024.5.6 in /docs (#4358)
Bumps [furo](https://github.com/pradyunsg/furo) from 2024.4.27 to 2024.5.6.
- [Release notes](https://github.com/pradyunsg/furo/releases)
- [Changelog](https://github.com/pradyunsg/furo/blob/main/docs/changelog.md)
- [Commits](https://github.com/pradyunsg/furo/compare/2024.04.27...2024.05.06)

---
updated-dependencies:
- dependency-name: furo
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-13 05:27:58 -07:00
dependabot[bot]
c827551b23
Bump AndreMiras/coveralls-python-action from 8799c9f4443ac4201d2e2f2c725d577174683b99 to 65c1672f0b8a201702d86c81b79187df74072505 (#4359)
Bump AndreMiras/coveralls-python-action

Bumps [AndreMiras/coveralls-python-action](https://github.com/andremiras/coveralls-python-action) from 8799c9f4443ac4201d2e2f2c725d577174683b99 to 65c1672f0b8a201702d86c81b79187df74072505.
- [Release notes](https://github.com/andremiras/coveralls-python-action/releases)
- [Changelog](https://github.com/AndreMiras/coveralls-python-action/blob/develop/CHANGELOG.md)
- [Commits](8799c9f444...65c1672f0b)

---
updated-dependencies:
- dependency-name: AndreMiras/coveralls-python-action
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-13 05:24:13 -07:00
Cooper Lees
3be19b306f
docker: Install the compiled wheel then install extras dependencies (#4357)
- Lets install black, then ask to install black with extrasC
  - pip sees black is installed and just installs extra dependencies

Test:
- Build local container
  - `docker build -t black_local .`
- Run blackd in container
  - `docker run -p 45484:45484 --rm black_local blackd --bind-host 0.0.0.0`
```
cooper@home1:~/repos/black$ docker run -p 45484:45484 --rm black_local blackd --bind-host 0.0.0.0
blackd version 24.4.3.dev11+gad60e62 listening on 0.0.0.0 port 45484
INFO:aiohttp.access:10.255.255.1 [10/May/2024:14:40:36 +0000] "GET / HTTP/1.1" 405 204 "-" "curl/8.5.0"

cooper@home1:~/repos/black$ curl http://10.6.9.2:45484
405: Method Not Allowed
```
- Test version is compiled
```
cooper@home1:~/repos/black$ docker run --rm black_local black --version
black, 24.4.3.dev11+gad60e62 (compiled: yes)
Python (CPython) 3.12.3
```

Fixes #4163
2024-05-10 08:23:10 -07:00
Jelle Zijlstra
f71925885c
Add caution to the playground mention (#4352) 2024-05-07 12:33:10 -07:00
Jelle Zijlstra
ccfb0db4d5
Extend link detection to links outside parens (#4347) 2024-05-04 16:14:13 -07:00
Jelle Zijlstra
c801cd60b1
Format docs/ and scripts/ in CI (#4348) 2024-05-04 13:26:36 -07:00
Samson Umezulike
f22b2437d5
Convert PR numbers in docs/change_log to clickable links (#4346)
Uses the sphinx include-read event to regex replace all occurrences of a PR number `(#X)` with a link `[(#X)](https://github.com/psf/black/pull/X)`.
2024-05-04 08:03:50 -07:00
Michael R. Crusoe
75eb55764e
packaging metadata: link to the docs, issue tracker (#4345)
See https://github.com/pypi/warehouse/issues/5947
https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#urls
2024-05-03 06:51:33 -07:00
dependabot[bot]
f2da85fe7f
Bump myst-parser from 2.0.0 to 3.0.1 in /docs (#4341)
Bumps [myst-parser](https://github.com/executablebooks/MyST-Parser) from 2.0.0 to 3.0.1.
- [Release notes](https://github.com/executablebooks/MyST-Parser/releases)
- [Changelog](https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/executablebooks/MyST-Parser/compare/v2.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: myst-parser
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-29 06:17:24 -07:00
dependabot[bot]
0ab0b75717
Bump furo from 2024.1.29 to 2024.4.27 in /docs (#4340)
Bumps [furo](https://github.com/pradyunsg/furo) from 2024.1.29 to 2024.4.27.
- [Release notes](https://github.com/pradyunsg/furo/releases)
- [Changelog](https://github.com/pradyunsg/furo/blob/main/docs/changelog.md)
- [Commits](https://github.com/pradyunsg/furo/compare/2024.01.29...2024.04.27)

---
updated-dependencies:
- dependency-name: furo
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-29 06:16:28 -07:00
Tomasz Kłoczko
0c033f3eb7
Upgrade some old syntax (#4338)
Signed-off-by: Tomasz Kłoczko <kloczek@github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-04-27 07:54:18 -07:00
Jelle Zijlstra
455de7703e
Fix another f-string regression (#4339) 2024-04-27 01:24:20 -07:00
Jelle Zijlstra
dbb956b0d3 New changelog 2024-04-25 18:25:22 -07:00
Jelle Zijlstra
3702ba224e
Prepare release 24.4.2 (#4335)
* Prepare release 24.4.2

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-25 16:52:26 -07:00
Jelle Zijlstra
e4aaa8a994
Fix incorrect f-string tokenization (#4332) 2024-04-25 16:45:46 -07:00
Jelle Zijlstra
ba88fc372e
Simplify string tokenization regexes (#4331) 2024-04-24 23:11:31 -07:00
Jelle Zijlstra
5683242fd4 New release template 2024-04-24 20:22:56 -07:00
Jelle Zijlstra
e7fb048281
Prepare release 24.4.1 (#4328) 2024-04-24 07:23:25 -07:00
Jelle Zijlstra
3f0f8f1956
Support PEP 696 (#4327) 2024-04-23 22:08:37 -07:00
S.S
2f88085da5
Github Action: Directly install from repo if export-subst is skipped (#4313) 2024-04-23 20:01:53 -07:00
Shantanu
12ce3db077
Move changelog entry to right section (#4326)
Crashes are usually documented in the stable style portion of the
changelog. This patch doesn't affect the parser (e.g. blib2to3).
Noticed the second after I merged :-)
2024-04-23 19:26:49 -07:00
peterkra25
1354be2525
Add support to style function definitions with newlines before function stubs (#4318)
* Add support to style function definitions containing newlines before function stubs

* Relocated implementation for removal of newlines before function stubs with added tests for comments

---------

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2024-04-23 19:19:56 -07:00
Tushar Sadhwani
f4b644b82f
Prevent wrapping of multiline fstrings in parens (#4325) 2024-04-23 14:16:47 -07:00
Tushar Sadhwani
551ede2825
Add PEP 701 support (#3822)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: hauntsaninja <hauntsaninja@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-04-22 08:19:19 -07:00
dependabot[bot]
944b99aa91
Bump sphinx from 7.2.6 to 7.3.7 in /docs (#4322)
Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 7.2.6 to 7.3.7.
- [Release notes](https://github.com/sphinx-doc/sphinx/releases)
- [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst)
- [Commits](https://github.com/sphinx-doc/sphinx/compare/v7.2.6...v7.3.7)

---
updated-dependencies:
- dependency-name: sphinx
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-22 00:01:38 -07:00
Shantanu
7134754ef4
Remove node-specific logic from visit_default (#4321)
This is the point of a visitor
2024-04-21 23:59:29 -07:00
Shantanu
7669381420
Pin to old flake8-bugbear (#4319)
See https://github.com/PyCQA/flake8-bugbear/issues/467 or https://github.com/psf/black/pull/4318
2024-04-21 20:19:47 -07:00
Shantanu
735733b205
Use uv in docs build (#4310)
Currently pip spends about 20s
2024-04-14 01:51:07 -07:00
Harsha S
9dc9114aef
Mention pipx installation 2024-04-14 01:11:24 -07:00
Shantanu
66e2b11571
Add new change template (#4308) 2024-04-12 13:25:36 -07:00
Shantanu
8fe627072f
Prepare release 24.4.0 (#4307) 2024-04-12 13:12:22 -07:00
dependabot[bot]
6b25e7cdab
Bump peter-evans/find-comment from 3.0.0 to 3.1.0 (#4304)
Bumps [peter-evans/find-comment](https://github.com/peter-evans/find-comment) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/peter-evans/find-comment/releases)
- [Commits](d5fe37641a...3eae4d3798)

---
updated-dependencies:
- dependency-name: peter-evans/find-comment
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 09:40:15 -04:00
alwayshang
07fe1ca88a
docs: remove repetitive word (#4303)
Signed-off-by: alwayshang <zhanghonghao@outlook.com>
2024-04-07 00:18:00 -07:00
Sebastian Rittau
3383f531bc
GitHub Action: Allow reading version from pyproject.toml (#4294)
Closes #4285

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-04-05 08:40:40 -04:00