Commit Graph

1676 Commits

Author SHA1 Message Date
Jelle Zijlstra
a69bda3b9b
Use inline flags for test cases (#3931)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2023-10-09 18:43:47 -07:00
Shantanu
715f60c11b
Drop support for parsing Python 2 (#3933) 2023-10-09 07:02:49 -07:00
dependabot[bot]
a8f68f57fe
Bump pypa/cibuildwheel from 2.16.1 to 2.16.2 (#3934)
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.16.1 to 2.16.2.
- [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.16.1...v2.16.2)

---
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-10-09 07:00:49 -07:00
Cooper Lees
738c2789cc
Set Docker to use 3.11 for now (#3927)
Until we get new aiohttp wheels we need to build with 3.11.
You can see an example of a fail here:

Workaround for #3919 - Will leave it open until we can move to 3.21
2023-10-06 11:39:20 -07:00
Cristiano Salerno
3457ec48af
Update output display to job summary (#3914)
* Update output display to job summary

* fix: handled exit-code of script

* added changelog message
2023-10-06 10:41:36 -07:00
David Lev
3a2d76c7bc
Remove $, >>> and other prompt prefixes when code copied from the… (#3884)
Adding configurations for sphinx-copybutton in conf.py
https://sphinx-copybutton.readthedocs.io/en/latest/use.html#using-regexp-prompt-identifiers
2023-10-05 18:21:56 -07:00
John Litborn
27c05e1e24
exclude tests/data/.* from mypy (#3917) 2023-10-05 18:15:35 -07:00
Jake Anto
6c88e8e46e
Update link to VS Code formatting instructions (#3921)
Update link
2023-10-05 18:14:59 -07:00
John Litborn
36078bc83f
respect magic trailing commas in return types (#3916) 2023-10-04 16:42:35 -07:00
pre-commit-ci[bot]
947bd3825e
[pre-commit.ci] pre-commit autoupdate (#3915)
updates:
- [github.com/pre-commit/mirrors-mypy: v1.5.0 → v1.5.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.5.0...v1.5.1)
- [github.com/pre-commit/mirrors-prettier: v3.0.1 → v3.0.3](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.1...v3.0.3)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-10-03 10:19:53 -07:00
Shreya Agarwal
9e9fdce9a8
docs: use LSP for SublimeText 4 (#3913) 2023-10-02 07:35:57 -07:00
dependabot[bot]
1b08cbc634
Bump pypa/cibuildwheel from 2.16.0 to 2.16.1 (#3911) 2023-10-01 23:40:00 -07:00
Shantanu
f99ef6e190
Fix up changelog (#3910) 2023-10-01 15:41:32 -07:00
Eddie Darling
a91eb73064
Fix comments getting removed from inside parenthesized strings (#3909)
Since the id of the old leaf may be
the key to comments, the new leaf
must adopt the old comments
2023-10-01 15:35:42 -07:00
Jelle Zijlstra
e7c3368c13
Try newer clang in diff-shades job (#3904) 2023-09-28 09:10:01 -07:00
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