Commit Graph

1338 Commits

Author SHA1 Message Date
Sagi Shadur
2893c42176
Remove hard coded test cases (#3062) 2022-05-18 12:11:37 -07:00
dependabot[bot]
7f033136ac
Bump docker/setup-buildx-action from 1 to 2 (#3058)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1 to 2.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v1...v2)

---
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>
2022-05-09 22:22:01 -04:00
dependabot[bot]
4af87d8a43
Bump docker/login-action from 1 to 2 (#3059)
Bumps [docker/login-action](https://github.com/docker/login-action) from 1 to 2.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v1...v2)

---
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>
2022-05-09 22:13:12 -04:00
dependabot[bot]
ba21a85699
Bump docker/build-push-action from 2 to 3 (#3057)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2 to 3.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v2...v3)

---
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>
2022-05-09 22:11:29 -04:00
dependabot[bot]
5d5b7316db
Bump docker/setup-qemu-action from 1 to 2 (#3056)
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 1 to 2.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v1...v2)

---
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>
2022-05-09 22:08:56 -04:00
Sagi Shadur
fc2a16433e
Read simple data cases automatically (#3034)
Co-authored-by: Felix Hildén <felix.hilden@gmail.com>
2022-05-08 12:27:40 -07:00
Iain Dorrington
20d8ccb542
Put closing quote on a separate line if docstring is too long (#3044)
Fixes #1632

Co-authored-by: Felix Hildén <felix.hilden@gmail.com>
2022-05-07 21:34:28 -07:00
Felix Hildén
62c2b167bc
Docs: clarify fmt:on/off requirements (#2985) (#3048) 2022-05-07 17:58:10 -07:00
Zac Hatfield-Dodds
9ce100ba61
Move imports of ThreadPoolExecutor into reformat_many(), allowing Black-in-the-browser (#3046)
This is a slight perf win for use-cases that don't invoke `reformat_many()`, but more importantly to me today it means I can use Black in pyscript.
2022-05-06 07:06:27 -07:00
Naveen
c940f75d5b
chore: Set permissions for GitHub actions (#3043)
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
2022-05-03 07:08:33 -06:00
dependabot[bot]
9d5edd3020
Bump myst-parser from 0.16.1 to 0.17.2 in /docs (#3019)
Bumps [myst-parser](https://github.com/executablebooks/MyST-Parser) from 0.16.1 to 0.17.2.
- [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/v0.16.1...v0.17.2)

---
updated-dependencies:
- dependency-name: myst-parser
  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>
2022-05-02 11:12:23 -06:00
Cooper Lees
fb8dfdeec5
Stop pinning lark-parser (#3041)
- Latest version works more

Test: `tox -e fuzz`
2022-04-28 10:27:16 -06:00
Vadim Nikolaev
c6800e0c65
Fix strtobool function (#3025)
* Fix strtobool function for vim plugin
* Update CHANGES.md

Co-authored-by: Cooper Lees <me@cooperlees.com>
2022-04-28 09:17:23 -06:00
JiriKr
8ed3e3d07e
Updated Black Docker Hub link in docs (#3023)
Fixes #3022
2022-04-21 12:55:56 -07:00
Batuhan Taskaya
7f7673d941
Support 3.11 / PEP 654 syntax (#3016) 2022-04-15 12:25:07 -04:00
Marco Edward Gorelli
712f8b37fb
Make ipynb tests compatible with ipython 8.3.0+ (#3008) 2022-04-13 19:13:33 -04:00
Jelle Zijlstra
96bd428524
Quote black[jupyter] and black[d] in installation docs (#3006)
We just got someone on Discord who was confused because the command as
written caused their shell to try to do command expansion.

Co-authored-by: Richard Si <63936253+ichard26@users.noreply.github.com>
2022-04-11 19:25:46 -04:00
dependabot[bot]
911b59fb4f
Bump furo from 2022.3.4 to 2022.4.7 in /docs (#3003)
Bumps [furo](https://github.com/pradyunsg/furo) from 2022.3.4 to 2022.4.7.
- [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/2022.03.04...2022.04.07)

---
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>
2022-04-11 19:24:00 -04:00
Sam Ezeh
40053b522e
Quote "black[jupyter]" in README.md (#3007) 2022-04-11 15:10:46 -07:00
dependabot[bot]
abdc31cd4f
Bump actions/upload-artifact from 2 to 3 (#3004)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  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>
2022-04-11 17:26:28 -04:00
Richard Si
497a72560d
Explain our use of mypyc in the FAQ (#3002)
I realized we don't have a FAQ entry about this, let's change that so
compiled: yes/no doesn't surprise as many people :)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-10 19:45:34 -04:00
Ryan Siu
431bd09e15
Correctly handle fmt: skip comments without internal spaces (#2970)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-09 16:52:45 -04:00
Joe Young
75f99bded3
Remove redundant parentheses around awaited coroutines/tasks (#2991)
This is a tricky one as await is technically an expression and therefore
in certain situations requires brackets for operator precedence.
However, the vast majority of await usage is just await some_coroutine(...)
and similar in format to return statements. Therefore this PR removes
redundant parens around these await expressions.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Richard Si <63936253+ichard26@users.noreply.github.com>
2022-04-09 16:49:40 -04:00
Joe Young
98fcccee55
Better manage return annotation brackets (#2990)
Allows us to better control placement of return annotations by:

a) removing redundant parens
b) moves very long type annotations onto their own line

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-09 10:36:05 -04:00
Joe Young
f6188ce6dc
Output python version and implementation as part of --version flag (#2997)
Example:

black, 22.1.1.dev56+g421383d.d20220405 (compiled: no)
Python (CPython) 3.9.12

Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
2022-04-06 14:04:12 -04:00
Hugo van Kemenade
9b307405fb
Top PyPI Packages: Use 30-days data, 365 is no longer available (#2995) 2022-04-06 15:48:50 +03:00
Jan-Hendrik Müller
421383d560
Update FAQ: Mention formatting of custom jupyter cell magic (#2982)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Richard Si <63936253+ichard26@users.noreply.github.com>
2022-04-04 18:24:16 -07:00
Richard Si
fa5fd262ff
Update test_black.shhh_click test for click 8+ (#2993)
The 8.0.x series renamed its "die on LANG=C" function and the 8.1.x
series straight up deleted it.

Unfortunately this makes this test type check cleanly hard, so we'll
just lint with click 8.1+ (the pre-commit hook configuration was changed
mostly to just evict any now unsupported mypy environments)
2022-04-04 18:23:30 -07:00
Joe Young
24c708eb37
Remove unnecessary parentheses from with statements (#2926)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Richard Si <63936253+ichard26@users.noreply.github.com>
2022-04-02 20:27:33 -07:00
Joe Young
4d0a4b15a9
Fix broken link in README.md (#2989)
Broken when we converted some more RST docs to MyST
2022-04-02 19:18:13 -04:00
Jelle Zijlstra
1af29fbfa5
try-except tomllib import (#2987)
See #2965 

I left the version check in place because mypy doesn't generally like try-excepted imports.
2022-04-02 08:29:32 -07:00
dependabot[bot]
5436810921
Bump peter-evans/create-or-update-comment from 1.4.5 to 2 (#2961)
Bumps [peter-evans/create-or-update-comment](https://github.com/peter-evans/create-or-update-comment) from 1.4.5 to 2.
- [Release notes](https://github.com/peter-evans/create-or-update-comment/releases)
- [Commits](a35cf36e53...c9fcb64660)

---
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>
2022-04-02 11:23:08 -04:00
dependabot[bot]
3451502daa
Bump peter-evans/find-comment from 1.3.0 to 2 (#2960)
Bumps [peter-evans/find-comment](https://github.com/peter-evans/find-comment) from 1.3.0 to 2.
- [Release notes](https://github.com/peter-evans/find-comment/releases)
- [Commits](d2dae40ed1...1769778a0c)

---
updated-dependencies:
- dependency-name: peter-evans/find-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>
2022-04-02 11:22:52 -04:00
Jelle Zijlstra
def048356b
Remove click pin in diff-shades workflow (#2979)
Click 8.1.1 was released with a fix for pallets/click#2227.
2022-03-30 14:33:16 -07:00
Jelle Zijlstra
a66016cb94
Add # type: ignore for click._unicodefun import (#2981) 2022-03-30 14:01:03 -07:00
Gunung P. Wibisono
3dea6e3635
Convert index.rst and license.rst to markdown (#2852)
Co-authored-by: Richard Si <63936253+ichard26@users.noreply.github.com>
2022-03-30 13:43:46 -07:00
Richard Si
82e150a13a
Keep tests working w/ upcoming aiohttp 4.0.0 (#2974)
aiohttp.test_utils.unittest_run_loop was deprecated since aiohttp 3.8
and aiohttp 4 (which isn't a thing quite yet) removes it. To maintain
compatibility with the full range of versions we declare to support,
test_blackd.py will now define a no-op replacement if it can't be
imported.

Also, mypy is painfully slow to use without a cache, let's reenable it.
2022-03-30 13:40:50 -07:00
dependabot[bot]
2d62a09e83
Bump actions/cache from 2.1.7 to 3 (GH-2962)
Bumps [actions/cache](https://github.com/actions/cache) from 2.1.7 to 3.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2.1.7...v3)

---
updated-dependencies:
- dependency-name: actions/cache
  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>
2022-03-28 21:42:53 -04:00
Jelle Zijlstra
ae2c0758c9
Prepare release 22.3.0 (#2968) 2022-03-28 12:08:29 -07:00
Jelle Zijlstra
e9681a40dc
Fix _unicodefun patch code for Click 8.1.0 (#2966)
Fixes #2964
2022-03-28 12:01:13 -07:00
dependabot[bot]
ac7402cbf6
Bump sphinx from 4.4.0 to 4.5.0 in /docs (GH-2959)
Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 4.4.0 to 4.5.0.
- [Release notes](https://github.com/sphinx-doc/sphinx/releases)
- [Changelog](https://github.com/sphinx-doc/sphinx/blob/4.x/CHANGES)
- [Commits](https://github.com/sphinx-doc/sphinx/compare/v4.4.0...v4.5.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>
2022-03-28 13:21:13 -04:00
Richard Si
f239d227c0
Enforce no formatting changes for PRs via CI (GH-2951)
Now PRs will run two diff-shades jobs, "preview-changes" which formats
all projects with preview=True, and "assert-no-changes" which formats
all projects with preview=False. The latter also fails if any changes
were made.

Pushes to main will only run "preview-changes"

Also the workflow_dispatch feature was dropped since it was
complicating everything for little gain.
2022-03-26 17:22:38 -04:00
Joe Young
bd1e980349
Remove unnecessary parentheses from except clauses (#2939)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-03-26 09:56:50 -07:00
Joe Young
14d84ba2e9
Resolve new flake8-bugbear errors (B020) (GH-2950)
Fixes a couple places where we were using the same variable name as we
are iterating over.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-03-24 11:14:21 -04:00
Joe Young
14e5ce5412
Remove unnecessary parentheses from tuple unpacking in for loops (#2945) 2022-03-24 07:59:54 -07:00
Joe Young
3800ebd81d
Avoid magic-trailing-comma in single-element subscripts (#2942)
Closes #2918.
2022-03-23 19:16:09 -07:00
Richard Si
062b54931d
Github now supports .git-blame-ignore-revs (GH-2948)
It's in beta.

https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view
2022-03-23 13:31:13 -04:00
Jelle Zijlstra
5379d4f3f4
stub style: remove some possible future changes (#2940)
Fixes #2938.

All of these suggested future changes are out of scope for an autoformatter and should be handled by a linter instead.
2022-03-21 15:20:41 -07:00
Marco Edward Gorelli
f87df0e3c8
dont skip formatting #%% (#2919)
Fixes #2588
2022-03-21 14:51:07 -07:00
Joseph Young
fa7f01592b
Update pylint config docs (#2931) 2022-03-16 10:00:30 -07:00