Commit Graph

1594 Commits

Author SHA1 Message Date
skykasko
a062d5c985
Fix typo in CITATION.cff (#3779)
Fix tiny typo in CITATION.cff
2023-07-10 19:38:01 -07:00
Jelle Zijlstra
193ee766ca
Prepare release 23.7.0 (#3776) 2023-07-10 17:09:47 -07:00
Shantanu
38723bb778
Unpin pytest-xdist (#3772) 2023-07-10 11:49:40 -07:00
Shantanu
138769aa27
Disable coverage on pypy tests (#3777)
The pypy tests are reeeeaaally slow. Maybe this will help.
2023-07-10 08:37:12 -07:00
Shantanu
ad3724b7ff
Upgrade to latest mypy (#3775) 2023-07-09 17:04:50 -07:00
Shantanu
b8e2ec728c
Fix crash on type comment with trailing space (#3773) 2023-07-09 16:28:26 -07:00
Jelle Zijlstra
257d392217
Fix removed comments in stub files (#3745) 2023-07-09 15:52:41 -07:00
Shantanu
2593af2c5d
Improve performance by skipping unnecessary normalisation (#3751)
This speeds up black by about 40% when the cache is full
2023-07-09 15:24:01 -07:00
Kenneth Schackart
f3b50e4669
Add CITATION.cff file (#3723) 2023-07-09 15:07:21 -07:00
Shantanu
0b4d7d55f7
Run pyupgrade on blib2to3 and src (#3771) 2023-07-09 15:05:01 -07:00
Shantanu
114e8357e6
Remove click patch (#3768)
Apparently this was only needed on Python 3.6. We've now dropped support
for 3.6 and 3.7. It's also not needed on new enough click.
2023-07-09 13:29:47 -07:00
Shantanu
4130c65578
Fix CI for Click typing issue (#3770)
https://github.com/pallets/click/issues/2558
2023-07-09 08:14:38 -07:00
Shantanu
b4dca26c7d
Drop support for Python 3.7 (#3765) 2023-07-05 10:08:04 -07:00
Shantanu
cf4cc29819
Better error message for invalid exclude types (#3764) 2023-07-04 22:45:57 -07:00
Zac Hatfield-Dodds
8e618f3869
Enable PYTHONWARNDEFAULTENCODING = 1 in CI (#3763) 2023-07-04 16:38:39 -07:00
rdrll
839ef35dc1
CI Test: Deprecating 'set-output' command (#3757) 2023-06-30 07:07:42 -07:00
rdrll
f01aaa63a0
Doc: Developer reference update (#3755) 2023-06-28 13:45:56 -07:00
rdrll
63481bb926
Fix a magical comment caused internal error (#3740)
`is_type_comment` now specifically deals with general type comments for a leaf.
`is_type_ignore_comment` now handles type comments contains ignore annotation for a leaf
`is_type_ignore_comment_string` used to determine if a string is an ignore type comment
2023-06-27 07:23:39 -07:00
Shantanu
31b3b6701d
Decrease cost of ipynb code path when unneeded (#3748)
IPython is a very expensive import, like, at least 300ms. I'd also
venture that it's much more common than tokenize-rt, which is like 30ms.
I work in a repo where I use black, have IPython installed and there
happen to be a couple notebooks (that we don't want formatted). I know I
can force exclude ipynb, but this change doesn't really have a cost.
2023-06-26 17:47:55 -07:00
Shantanu
e1036119f2
Check self format for the whole repo (#3750)
`black .` is changing things in gallery and scripts for me
2023-06-25 06:53:26 -07:00
Shantanu
93989e995d
Integrate verbose logging with get_sources (#3749)
Currently the verbose logging for "Sources to be formatted" is a little
suspect in that it is a completely different code path from
`get_sources`.

This can result in bugs like https://github.com/psf/black/pull/3216#issuecomment-1213557359
and generally limits the value of these logs.

This does change the "when" of this log, but the colours help separate
it from the even more verbose logs.
2023-06-24 17:27:47 -07:00
Shantanu
7be2735318
Allow specifying --workers via environment variable (#3743) 2023-06-24 16:06:12 -07:00
Stian Jensen
c732a1f13a
Build with mypyc 1.3 (#3697)
Several new versions of mypyc has been released since the last upgrade, and they include some performance improvements which could make the compiled version of Black run faster.

https://mypy-lang.org/news.html

The latest version of hatch-mypyc allows being installed next the 1.x series of mypy.
2023-06-22 21:22:28 -07:00
Renan Santos
453828d17d
Fix not honouring pyproject.toml when using stdin and calling black from parent directory (#3719)
Co-authored-by: Renan Rodrigues <renan.rodrigues@appliedbiomath.com>
2023-06-22 21:21:49 -07:00
rdrll
d1248ca9be
Doc: updating url link (#3739) 2023-06-20 07:06:03 -07:00
dependabot[bot]
e7783e9ab2
Bump myst-parser from 1.0.0 to 2.0.0 in /docs (#3738)
Bumps [myst-parser](https://github.com/executablebooks/MyST-Parser) from 1.0.0 to 2.0.0.
- [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/v1.0.0...v2.0.0)

---
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>
2023-06-19 06:58:20 -07:00
Yilei "Dolee" Yang
01b8d3d409
Do not add trailing commas to return type annotations using PEP 604 unions (#3735)
Fix #3638: Do not add trailing commas to return type annotations using PEP 604 unions.
2023-06-15 17:08:26 -07:00
Alwyn Kik
35722dff62
Max line length with bugbear (#3731)
* Make phrasing for flake8 users more concise

max-line-length should be 80 with flake8-bugbear
Fixes #3716

* Re-add rationale and an explanation for

disabling E203

* Run pre-commit
2023-06-12 12:20:31 -07:00
dependabot[bot]
688f78d380
Bump peter-evans/create-or-update-comment from 3.0.1 to 3.0.2 (#3730)
Bumps [peter-evans/create-or-update-comment](https://github.com/peter-evans/create-or-update-comment) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/peter-evans/create-or-update-comment/releases)
- [Commits](ca08ebd5dc...c6c9a1a660)

---
updated-dependencies:
- dependency-name: peter-evans/create-or-update-comment
  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>
2023-06-12 10:08:45 -07:00
dependabot[bot]
c76e0b03ec
Bump pypa/cibuildwheel from 2.13.0 to 2.13.1 (#3729)
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.13.0 to 2.13.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.13.0...v2.13.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>
2023-06-12 10:05:49 -07:00
Ville Skyttä
898915d556
Use aware datetimes to represent UTC (#3728)
Avoids a Python 3.12 deprecation warning.

Subtle difference: previously, timestamps in diff filenames had the
`+0000` separated from the timestamp by space. With this, the space is
there no more, and there is a colon, as in `+00:00`.
2023-06-10 09:54:21 -07:00
Jelle Zijlstra
3aad6e385b
Add support for PEP 695 syntax (#3703) 2023-06-01 18:37:08 -07:00
jmcb
a538ab7663
blackd: show default values for options (#3712)
* blackd: show default values for options

Reference: https://click.palletsprojects.com/en/8.1.x/api/#click.Option

* Fix spacing in CHANGES.md
2023-05-31 14:29:31 -07:00
dependabot[bot]
a4032dce64
Bump pypa/cibuildwheel from 2.12.3 to 2.13.0 (#3710)
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.12.3 to 2.13.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.12.3...v2.13.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>
2023-05-29 06:33:41 -07:00
Jelle Zijlstra
c42178690e
Fix docs formatting (#3704) 2023-05-24 21:06:08 -07:00
Jelle Zijlstra
3decbd6db9
Document each configuration option in more detail (#2839) 2023-05-24 19:55:12 -07:00
Stefaan Lippens
f95b43d6fa
docs: update note on GitHub .git-blame-ignore-revs support (#3655) 2023-05-24 19:53:27 -07:00
Deepyaman Datta
c99417ffe8
Change example from %%writeline to %%writefile (#3673) 2023-05-24 19:52:59 -07:00
dependabot[bot]
cd02c2809b
Bump furo from 2023.3.27 to 2023.5.20 in /docs (#3698)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-22 11:47:58 -04:00
Jason R. Coombs
eedfc38322
Avoid EncodingWarning in blib2to3 (#3696) 2023-05-19 10:00:29 -07:00
Jonathan Berthias
2fd9d8b339
Remove blank lines before class docstring (#3692) 2023-05-18 16:57:17 -07:00
Ray Bell
db3668a381
Sort DEFAULT_EXCLUDES and add .vscode, .pytest_cache and .ruff_cache (#3691)
Co-authored-by: Ray Bell <ray.bell@dtn.com>
2023-05-16 22:47:45 -04:00
dependabot[bot]
dc188f2060
Bump peter-evans/find-comment from 2.3.0 to 2.4.0 (#3670)
Bumps [peter-evans/find-comment](https://github.com/peter-evans/find-comment) from 2.3.0 to 2.4.0.
- [Release notes](https://github.com/peter-evans/find-comment/releases)
- [Commits](034abe94d3...a54c31d7fa)

---
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>
Co-authored-by: Cooper Lees <me@cooperlees.com>
2023-05-15 15:41:35 -07:00
Matthieu Simon
c97b9c55b4
[github action] display black result in job summary (#3688)
* send output to $GITHUB_STEP_SUMMARY

* update CHANGES.md

* update CHANGES.md with PR number

* implement PR feedback

* fix pre-commit issues (prettier/trailing whitespace)
2023-05-15 14:35:39 -07:00
dependabot[bot]
64887aab03
Bump peter-evans/create-or-update-comment from 2.1.1 to 3.0.1 (#3683)
Bumps [peter-evans/create-or-update-comment](https://github.com/peter-evans/create-or-update-comment) from 2.1.1 to 3.0.1.
- [Release notes](https://github.com/peter-evans/create-or-update-comment/releases)
- [Commits](67dcc547d3...ca08ebd5dc)

---
updated-dependencies:
- dependency-name: peter-evans/create-or-update-comment
  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>
2023-05-08 06:36:24 -07:00
Jelle Zijlstra
eb32729ab5
blib2to3: add a few annotations (#3675) 2023-05-03 10:26:57 -07:00
Jelle Zijlstra
a07871b9cd
Fix new mypy error in blib2to3 (#3674)
See python/mypy#15174
2023-05-03 08:43:20 -07:00
Yilei "Dolee" Yang
e712e48e06
Do not wrap implicitly concatenated strings used as func args in parens (#3640) 2023-04-28 11:10:01 -07:00
dependabot[bot]
de65741b8d
Bump pypa/cibuildwheel from 2.12.1 to 2.12.3 (#3657)
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.12.1 to 2.12.3.
- [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.12.1...v2.12.3)

---
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>
2023-04-24 04:46:34 -07:00
James Braza
4b76a54815
Document black-jupyter hook (#3650)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-04-19 03:24:03 -07:00