Commit Graph

1861 Commits

Author SHA1 Message Date
John Litborn
9b82120ddb
add support for printing the diff of AST trees when running tests (#3902)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-09-28 07:03:24 -07:00
dependabot[bot]
3dcacdda0d
Bump pypa/cibuildwheel from 2.15.0 to 2.16.0 (#3901)
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.15.0 to 2.16.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.15.0...v2.16.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-09-25 09:32:58 -07:00
Syed Mohammad Ibrahim
5f6ea5ff20
added the py311 to target-version config (#3898) 2023-09-23 19:23:03 -07:00
John Litborn
8c5d96ffd3
fix indentation of line breaks in long type hints by adding parens (#3899)
* fix indentation of line breaks in long type hints by adding parentheses, and remove unnecessary parentheses

* add entry in CHANGES.md, make the style change only in preview mode
2023-09-22 08:38:51 -07:00
Eero Vaher
e974fc3c52
Remove outdated mentions of runtime support of Python 3.7 (#3896)
Remove mentions of runtime support of Python 3.7

Runtime support of Python 3.7 was removed in
b4dca26c7d but a few mentions of it being
supported have remained until now.
2023-09-18 10:35:07 -07:00
dependabot[bot]
7316a79318
Bump actions/checkout from 3 to 4 (#3893)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  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-09-18 06:48:27 -07:00
dependabot[bot]
f5990e8547
Bump docker/setup-qemu-action from 2 to 3 (#3890)
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  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-09-18 06:48:11 -07:00
dependabot[bot]
edf66baa21
Bump docker/setup-buildx-action from 2 to 3 (#3892)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  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-09-18 06:48:03 -07:00
dependabot[bot]
ab92daf408
Bump docker/login-action from 2 to 3 (#3891)
Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/login-action
  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-09-18 06:47:43 -07:00
dependabot[bot]
34ed4cf8fd
Bump docker/build-push-action from 4 to 5 (#3894)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4 to 5.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v4...v5)

---
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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-18 06:47:26 -07:00
dependabot[bot]
5a0615a7ed
Bump sphinx from 7.2.5 to 7.2.6 in /docs (#3895)
Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 7.2.5 to 7.2.6.
- [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.5...v7.2.6)

---
updated-dependencies:
- dependency-name: sphinx
  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-09-18 06:47:02 -07:00
Shantanu
e9356c1ff0
Document disabling E704 (#3888)
Linking #3887
2023-09-13 00:40:41 -07:00
Shantanu
004fb79706
mypyc build improvements (#3881)
Build in separate jobs. This makes it clearer if e.g. a single Python
version is failing. It also potentially gets you more parallelism.

Build everything on push to master.

Only build Linux 3.8 and 3.11 wheels on PRs.
2023-09-11 13:36:37 -07:00
dependabot[bot]
14f60c84c8
Bump docutils from 0.19 to 0.20.1 in /docs (#3699)
Bumps [docutils](https://docutils.sourceforge.io/) from 0.19 to 0.20.1.
2023-09-11 13:20:36 -07:00
dependabot[bot]
b2f03f9132
Bump sphinx from 7.2.3 to 7.2.5 in /docs (#3882)
Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 7.2.3 to 7.2.5.
- [Release notes](https://github.com/sphinx-doc/sphinx/releases)
- [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES)
- [Commits](https://github.com/sphinx-doc/sphinx/compare/v7.2.3...v7.2.5)
2023-09-11 13:19:57 -07:00
Simon Alinder
e73662ca7c
Fix broken url in editors.md (#3885)
* Fix broken url in editors.md

Update a link pointing to the Arch Linux repos.

* [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>
2023-09-11 09:47:47 -07:00
dependabot[bot]
213cb65518
Bump actions/checkout from 3 to 4 (#3883)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  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-09-11 09:34:36 -07:00
Jelle Zijlstra
e87737140f
Prepare release 23.9.1 (#3878) 2023-09-10 17:35:41 -07:00
Shantanu
62dca32dc5
mypyc builds on PRs, skip mypyc wheels for 3.12 (#3870)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-09-10 16:47:08 -07:00
Jelle Zijlstra
751583a1df
Pickle raw tuples in FileData cache (#3877)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2023-09-10 16:16:24 -07:00
Jelle Zijlstra
f7917453c9
Re-export black.Mode (#3875) 2023-09-10 16:12:20 -07:00
Jelle Zijlstra
0b62b9c9a4
Ignore aiohttp DeprecationWarning for 3.12 (#3876)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2023-09-10 15:45:13 -07:00
Hugo van Kemenade
c83ad6c077
Upgrade to Furo 2023.9.10 to fix docs build (#3873) 2023-09-10 14:36:25 -07:00
Shantanu
4eebfd1a7a
Add mypyc test marks to new tests that patch (#3871)
This is enough for me to get a clean test run on Python 3.9 with mypyc.
I have not been able to repro the pickle failures on either Linux or
macOS.
2023-09-10 07:53:27 -07:00
Richard Si
add161b367
Bump RTD Python version from 3.8 to 3.11 (#3868)
Recent ReadTheDocs builds have been failing as our documentation dependencies (notably Sphinx) require Python 3.9+.
2023-09-09 09:08:28 -07:00
Shantanu
4e93f2aa01
Add classifier for 3.12 (#3866) 2023-09-08 22:16:25 -07:00
Jelle Zijlstra
716fa08090
Upgrade mypy (#3864) 2023-09-08 22:16:15 -07:00
Jelle Zijlstra
b70b2c6196
Prepare release 23.9.0 (#3863) 2023-09-08 20:24:49 -07:00
konsti
b40b01ffe3
Blank line between nested and function def in stub files. (#3862)
The idea behind this change is that we stop looking into previous body to determine if there should be a blank before a function or class definition.

Input:

```python
import sys

if sys.version_info > (3, 7):
    class Nested1:
        assignment = 1
        def function_definition(self): ...
    def f1(self) -> str: ...
    class Nested2:
        def function_definition(self): ...
        assignment = 1
    def f2(self) -> str: ...

if sys.version_info > (3, 7):
    def nested1():
        assignment = 1
        def function_definition(self): ...
    def f1(self) -> str: ...
    def nested2():
        def function_definition(self): ...
        assignment = 1
    def f2(self) -> str: ...
```

Stable style
```python
import sys

if sys.version_info > (3, 7):
    class Nested1:
        assignment = 1
        def function_definition(self): ...

    def f1(self) -> str: ...

    class Nested2:
        def function_definition(self): ...
        assignment = 1
    def f2(self) -> str: ...

if sys.version_info > (3, 7):
    def nested1():
        assignment = 1
        def function_definition(self): ...

    def f1(self) -> str: ...
    def nested2():
        def function_definition(self): ...
        assignment = 1
    def f2(self) -> str: ...
```

In the stable formatting, we have a blank line sometimes, not depending on the previous statement on the same level, but on the last (potentially nested) statement in the previous body.

#2783/#3564 fixes this for classes in preview style:

```python
import sys

if sys.version_info > (3, 7):
    class Nested1:
        assignment = 1
        def function_definition(self): ...

    def f1(self) -> str: ...

    class Nested2:
        def function_definition(self): ...
        assignment = 1

    def f2(self) -> str: ...

if sys.version_info > (3, 7):
    def nested1():
        assignment = 1
        def function_definition(self): ...

    def f1(self) -> str: ...
    def nested2():
        def function_definition(self): ...
        assignment = 1
    def f2(self) -> str: ...
```

This PR additionally fixes this for function definitions:

```python
if sys.version_info > (3, 7):
    if sys.platform == "win32":
        assignment = 1
        def function_definition(self): ...

    def f1(self) -> str: ...
    if sys.platform != "win32":
        def function_definition(self): ...
        assignment = 1

    def f2(self) -> str: ...

if sys.version_info > (3, 8):
    if sys.platform == "win32":
        assignment = 1
        def function_definition(self): ...

    class F1: ...
    if sys.platform != "win32":
        def function_definition(self): ...
        assignment = 1

    class F2: ...
```

You can see the effect of this change on typeshed in https://github.com/konstin/typeshed/pull/1/files. As baseline, the preview mode changes without this PR are at https://github.com/konstin/typeshed/pull/2.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-09-08 18:51:27 -07:00
Charlie Marsh
a20338cf10
Avoid removing whitespace for walrus operators within subscripts (#3823)
Co-authored-by: hauntsaninja <hauntsaninja@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-09-08 07:37:13 -07:00
Jonas Haag
74d3009ba4
Add Black PyCharm 2023.2 integration instructions (#3839) 2023-09-07 18:35:07 -07:00
KotlinIsland
8daa64a2e1
blackd: fix mishandling of single character input (#3558) 2023-09-07 00:11:50 -07:00
Shantanu
df50fee7fd
Apply ignore logic before symlink resolution (#3846)
This means, for instance, that a gitignored symlink cannot affect your
formatting. Fixes #3527, fixes #3826
2023-09-06 21:06:07 -07:00
Johnny.H
58f1bf69d2
Move coverage configurations to pyproject.toml (#3858) 2023-09-02 22:46:23 -04:00
dependabot[bot]
47676bf593
Bump furo from 2023.7.26 to 2023.8.19 in /docs + sphinx to 7.2.3 (#3848)
* Bump furo from 2023.7.26 to 2023.8.19 in /docs

Bumps [furo](https://github.com/pradyunsg/furo) from 2023.7.26 to 2023.8.19.
- [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/2023.07.26...2023.08.19)

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

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

* Move to sphinx 7.2.3 + fix intersphinx_mapping

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Cooper Ry Lees <me@cooperlees.com>
2023-08-26 08:44:17 -05:00
Kjell-Magnus
d9c249c25a
Fix download badge link (#3853) 2023-08-22 12:40:10 -07:00
Shantanu
6310a405f6
Improve handling of root to get_sources (#3847)
This is a little more type safe and a little cleaner
2023-08-19 08:13:05 -07:00
Marc Mueller
066aa9210a
Remove tox pin (#3844) 2023-08-19 08:09:59 -07:00
Marc Mueller
c6a031e623
Improve caching by comparing file hashes as fallback for mtime and size (#3821)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2023-08-18 19:26:36 -07:00
Shantanu
793c2b5f9f
Pin tox to fix CI (#3843) 2023-08-18 18:32:47 -07:00
pre-commit-ci[bot]
ade371fd1c
[pre-commit.ci] pre-commit autoupdate (#3837) 2023-08-16 00:01:21 -07:00
Shantanu
7c4fe83bd8
Make pre-commit do less (#3838) 2023-08-15 06:51:26 -07:00
dependabot[bot]
66648c528a
Bump pypa/cibuildwheel from 2.14.1 to 2.15.0 (#3836) 2023-08-14 00:30:56 -07:00
Christian Proud
c36e468794
Remove ENV_PATH on Black action completion (#3759) 2023-08-08 11:12:05 -07:00
pre-commit-ci[bot]
77f19944f6
[pre-commit.ci] pre-commit autoupdate (#3833)
updates:
- [github.com/pre-commit/mirrors-prettier: v3.0.0 → v3.0.1](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.0...v3.0.1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-08-08 08:41:39 -07:00
Shantanu
c160e4b7ce
More concise formatting for dummy implementations (#3796) 2023-08-03 19:11:21 -07:00
Shantanu
59e8936768
Document pre-commit mirror (#3828) 2023-08-03 18:46:08 -07:00
pre-commit-ci[bot]
1b028cc9d9
[pre-commit.ci] pre-commit autoupdate (#3825) 2023-08-01 01:48:21 -07:00
dependabot[bot]
8a16b25fb1
Bump furo from 2023.5.20 to 2023.7.26 in /docs (#3824)
Bumps [furo](https://github.com/pradyunsg/furo) from 2023.5.20 to 2023.7.26.
- [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/2023.05.20...2023.07.26)

---
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>
2023-07-31 08:43:32 -07:00
Aneesh Agrawal
1a972e3e11
Add Lyft to organizations using black (#3818) 2023-07-27 14:50:51 -07:00