Commit Graph

1910 Commits

Author SHA1 Message Date
Hugo van Kemenade
bbfdba3a5e
Fix docs CI: use venv for uv to fix 'failed to create directory' (#4460)
Use venv for uv to fix 'failed to create directory'
2024-09-16 00:10:34 -07:00
Shantanu
8fb2add1f7
Use builtin generics (#4458)
uvx ruff check --output-format concise src --target-version py39 --select UP006 --fix --unsafe-fixes
uvx ruff check --output-format concise src --target-version py39 --select F401 --fix
plus some manual fixups
2024-09-15 20:10:07 -07:00
Shantanu
2a45cecf29
Fix crashes with comments in parentheses (#4453)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-09-15 19:34:02 -07:00
Shantanu
b4d6d8632d
Drop Python 3.8 support (#4452) 2024-09-15 18:21:21 -07:00
Shantanu
ac018c16ca
Require newer aiohttp for blackd (#4451) 2024-09-15 18:05:23 -07:00
Shantanu
058da5f81a
Report Black version on internal error (#4457) 2024-09-12 15:24:56 -07:00
Sam Burnett
98a580bbdc
Added Python and grammar versions to a parser error message (#4378)
---------

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Shantanu Jain <hauntsaninja@gmail.com>
2024-09-08 14:24:54 -07:00
Matej Aleksandrov
f50aba4984
Fix broken GitHub link to black.schema.json (#4445) 2024-09-07 18:14:27 -07:00
Shantanu
6b27ef53e2
Caveat Python 3.13 support (#4448)
Note the actual release workflow will probably fail as it currently
stands, I anticipate we'd need to add CIBW_SKIP
2024-09-07 17:32:57 -07:00
Shantanu
26aeebe9fb
Update mypy/c (#4450) 2024-09-07 17:32:47 -07:00
Shantanu
9e13708be8
Prevent use on Python 3.12.5 (#4447)
Fixes #4446
See https://github.com/python/cpython/issues/123821

It's possible this is too strict? We could instead do this anytime the
AST safety check fails, but feels weird to have that happen
non-deterministically
2024-09-07 16:41:06 -07:00
Ewout ter Hoeven
ac28187bf4
Fully support Python 3.13, including CI testing and wheel building (#4436) 2024-08-26 10:07:54 -07:00
Terence Honles
823a7b0ff0
fix: fix PEP 646 support of tuple unpacking (#4440)
This change fixes unpacking a tuple or generic type when *args is a type
variable tuple.
2024-08-26 08:09:59 -07:00
Shantanu
699b45aef7
Fix type error in blackd (#4442) 2024-08-22 18:17:32 -07:00
dependabot[bot]
c20423249e
Bump furo from 2024.7.18 to 2024.8.6 in /docs (#4435)
Bumps [furo](https://github.com/pradyunsg/furo) from 2024.7.18 to 2024.8.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.07.18...2024.08.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-08-08 18:20:00 -07:00
Richard Si
5ec91686ff
Remove myself from docs dependency upgrade reviews (#4433) 2024-08-08 19:10:23 -04:00
Jelle Zijlstra
7e3e8f5bd9 Add new changelog 2024-08-05 10:33:28 -07:00
Jelle Zijlstra
b965c2a502
Prepare release 24.8.0 (#4426) 2024-08-02 09:38:22 -07:00
Michael Eliachevitch
9ccf279a17
Document find_project_root ignoring pyproject.toml without [tool.black] (#4425)
Extend the docstring of black's `find_project_root` to mention that it ignores
`pyproject.toml` files without a `[tool.black]` section.

This is relevant because that function is also used by other python packages
that use black. I found that e.g. datamodel-code-generator [1] uses that
function and that there the ignoring of the pyproject.toml files lead to
a degradation [2]. I think in that case it would be better to not use black's function
for finding the pyproject.toml, but in any case this behavior should be documented.

1: https://github.com/koxudaxi/datamodel-code-generator
2: https://github.com/koxudaxi/datamodel-code-generator/issues/2052

Co-authored-by: Michael Eliachevitch <Michael.Eliachevitch@blueyonder.com>
2024-08-02 09:38:07 -07:00
Kanishk Pachauri
14b6e61970
fix: Enhace black efficiently to skip directories listed in .gitignore (#4415) 2024-08-02 09:24:39 -07:00
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