Commit Graph

381 Commits

Author SHA1 Message Date
Harsha S
9dc9114aef
Mention pipx installation 2024-04-14 01:11:24 -07:00
Shantanu
8fe627072f
Prepare release 24.4.0 (#4307) 2024-04-12 13:12:22 -07:00
alwayshang
07fe1ca88a
docs: remove repetitive word (#4303)
Signed-off-by: alwayshang <zhanghonghao@outlook.com>
2024-04-07 00:18:00 -07:00
Sebastian Rittau
3383f531bc
GitHub Action: Allow reading version from pyproject.toml (#4294)
Closes #4285

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-04-05 08:40:40 -04:00
rdrll
f78b15712a
Fix formatting for if clauses in match-case blocks (#4269)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-03-16 07:38:07 -07:00
Jelle Zijlstra
552baf8229
Prepare release 24.3.0 (#4279) 2024-03-15 12:17:00 -07:00
Daniel Krzeminski
719e67462c
Fix 4227: Improve documentation for --quiet --check (#4236)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-03-12 21:15:29 -07:00
Charpy
e5510afc06
update plugin url for Thonny (#4259) 2024-03-12 21:14:06 -07:00
Victorien
899002399a
Remove usage of pkg_resources in docs/conf.py (#4251) 2024-02-26 07:49:39 -08:00
Shantanu
ea66d40dd7
Update empty line documentation (#4239)
Reflects status quo following #4043

Fixes #4238
2024-02-25 16:36:52 -08:00
Shantanu
6fdf8a4af2
Prepare release 24.2.0 (#4226) 2024-02-12 12:11:15 -08:00
Logan Hunt
dab37a6a11
Remove redundant parentheses in case statement if guards (#4214)
A follow up to #4024 but for `if` guards in `case` statements. I noticed this
when #4024 was made stable, and noticed I had some code that had extra parens
around the `if` guard.
2024-02-07 06:55:02 -08:00
Seung Wan Yoo
32230e6f5c
fix: bug where the doublestar operation had inconsistent formatting. (#4154)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-02-05 05:33:11 -08:00
Brandon J
7edb50f5a0
fix: additional newline added to docstring when the previous line length is less than the line length limit minus 1 (#4185)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-02-05 04:56:07 -08:00
dependabot[bot]
3e80de3447
Bump furo from 2023.9.10 to 2024.1.29 in /docs (#4211)
Bumps [furo](https://github.com/pradyunsg/furo) from 2023.9.10 to 2024.1.29.
- [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.09.10...2024.01.29)

---
updated-dependencies:
- dependency-name: furo
  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-02-05 04:47:35 -08:00
cobalt
632f44bd68
docs: Refactor pycodestyle/Flake8 compatibility docs (#4194)
Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-02-01 22:00:41 -08:00
Jelle Zijlstra
9728b8e9b8
Move hug_parens_with_braces_and_square_brackets into the unstable style (#4198)
Primarily because of #4036 (a crash) but also because of the feedback
in #4098 and #4099.
2024-02-01 21:58:51 -08:00
Shantanu
2623269dab
Ignore pyproject.toml missing tool.black section (#4204)
Fixes #2863

This is pretty desirable in a monorepo situation where you have
configuration in the root since it will mean you don't have to
reconfigure every project.

The good news for backward compatibility is that `find_project_root`
continues to stop at any git or hg root, so in all cases repo root
coincides with a pyproject.toml missing tool.black, we'll continue to
have the project root as before and end up using default config
(i.e. we're unlikely to randomly start using the user config).

The other thing we need to be a little careful about is that changing
find_project_root logic affects what `exclude` is relative to.  Since we
only change in cases where there is no config, this only applies where
users were using `exclude` via command line arg (and had pyproject.toml
missing tool.black in a dir that was not repo root).

Finally, for the few who could be affected, the fix is to put an empty
`[tool.black]` in pyproject.toml
2024-02-01 21:50:45 -08:00
Jelle Zijlstra
cca3c0fd9f
Test that preview/unstable features are documented (#4187)
In #4096 I added a list of current preview/unstable features to the docs. I think
this is important for publicizing what's in our preview style. This PR adds an
automated test to ensure the list stays up to date in the future.
2024-01-30 22:22:38 -08:00
Jelle Zijlstra
e026c93888
Prepare release 24.1.1 (#4186) 2024-01-27 20:51:32 -08:00
cobalt
8bf04549ff
Consistently add trailing comma on typed parameters (#4164)
Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-01-27 13:55:22 -08:00
Jelle Zijlstra
0e6e46b9eb
Prepare release 24.1.0 (#4170) 2024-01-25 20:35:21 -08:00
Jelle Zijlstra
4f47cac192
Add --unstable flag (#4096) 2024-01-25 17:00:47 -08:00
Shantanu
f7d552d9b7
Remove reference (#4169)
This is out-of-date and just a chore. I don't think this is useful to
contributors and Black doesn't even have a public API.
2024-01-25 13:11:26 -08:00
Kevin Paulson
7f60f3dbd7
Update using_black_with_other_tools.md to ensure flake8 configuration examples are consistant (#4157) 2024-01-19 15:54:32 -08:00
Dragorn421
b7c3a9fedd
Docs: Add note on --exclude about possibly verbose regex (#4145)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-01-11 07:46:17 -08:00
Cooper Lees
ec91a2be3c
Prepare release 23.12.1 (#4124) 2023-12-22 15:04:32 -08:00
Jelle Zijlstra
d9ad09a32b
Prepare release 23.12.0 (#4105) 2023-12-11 21:55:28 -08:00
cobalt
e7e122e9ff
docs: Move fmt: off docs (#4090) 2023-12-09 17:44:15 -08:00
cobalt
432d9050c3
docs: Unify option descriptions between --help and the_basics.md (#4076) 2023-12-07 09:32:06 -08:00
cobalt
50e287cece
docs: Clarify include/exclude documentation (#4072) 2023-12-07 08:38:57 -08:00
Yilei Yang
a8062983cd
Disable the stability check with --line-ranges for now. (#4034)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-11-20 20:45:39 -08:00
tungol
89e28ea66f
Permit standalone form feed characters at the module level (#4021)
Co-authored-by: Stephen Morton <git@tungol.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-11-20 20:44:33 -08:00
Yilei Yang
11da02da72
Handle more huggable immediately nested parens/brackets. (#4012)
Fixes #4011
2023-11-18 11:47:05 -08:00
cobalt
5773d5cd2b
Document target version inference (#4048) 2023-11-17 13:39:44 -08:00
Jelle Zijlstra
2a1c67e0b2
Prepare release 23.11.0 (#4032) 2023-11-07 20:44:46 -08:00
Yilei Yang
46be1f8e54
Support formatting specified lines (#4020) 2023-11-06 18:05:25 -08:00
Henri Holopainen
ddfecf06c1
Hug parens also with multiline unpacking (#3992) 2023-10-30 08:35:26 -07:00
Cooper Lees
f7cbe4ae1b
Add release tool (#3974)
* Add release tool

- Add tool for release managers to use to generate commits
  - I'm trying to only use stdlib so we have no depdencies ...
- Default is to change date strings in hard coded documentation files + CHANGES.md
  - I write directly to files cause we have SCM to fix any screw ups ...
- We hackily convert calver to ints to sort (all for better ideas here)
  - If we hit a ValueError we just set to 0 for sorting - This is alhpa + beta release we can safely ignore these days
- Add new CI to only run release unittests in 3.12 only on all platforms
- Update release docs

- Checked with `mypy --strict` + ensure we are `black --preview` formatted :D

Tests:
- Run it to generate template PR
  - `python3.12 release.py --debug --add-changes-template`
- Run it to cleanup CHANGE.md + change version in specified doc files
```
crl-m1:black cooper$ python3.12 release.py -d
[2023-10-23 23:39:38,414] INFO: Current version detected to be 23.10.1 (release.py:221)
[2023-10-23 23:39:38,414] INFO: Next version will be 23.10.2 (release.py:222)
[2023-10-23 23:39:38,414] INFO: Cleaning up /Users/cooper/repos/black/CHANGES.md (release.py:127)
[2023-10-23 23:39:38,416] DEBUG: Finished Cleaning up /Users/cooper/repos/black/CHANGES.md (release.py:147)
[2023-10-23 23:39:38,416] INFO: Updating black version to 23.10.2 in /Users/cooper/repos/black/docs/integrations/source_version_control.md (release.py:173)
[2023-10-23 23:39:38,416] DEBUG: Finished updating black version to 23.10.2 in /Users/cooper/repos/black/docs/integrations/source_version_control.md (release.py:185)
[2023-10-23 23:39:38,416] INFO: Updating black version to 23.10.2 in /Users/cooper/repos/black/docs/usage_and_configuration/the_basics.md (release.py:173)
[2023-10-23 23:39:38,417] DEBUG: Finished updating black version to 23.10.2 in /Users/cooper/repos/black/docs/usage_and_configuration/the_basics.md (release.py:185)
```
- Add tests around some key logic

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix lints + add git to release CI

- Remove black + mypy as linting already runs it ...
- Ignore delete param to TemporaryDirectory as we can't set mypy to 3.12 :D

* Only run CI on linux/ubuntu for now

* Add lots of debug printing + directly run unitests (not via coverage)

* Overloading __str__ is bad on a TestCase

* Add more logging around git tag

* Print where git is in a step

* Rollback creating a fake black repo as we were not using it - I did plan to but I can't get it working on GitHub actions

* Do a deep checkout

* Add noqa for E701,E761 ... maybe we need this in our flake8 config now?

* Fix action to have correct workflow yaml to action on
- Also add fix to not double run when we push directly to psf/black

* All jelle suggestions
- Fix bug missing lines ending with --> in CHANGES.md to delete ...
- Update ci to run out of scripts dir too
- Update test_tuple_calver

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-10-29 15:34:38 -07:00
Shantanu
c712d57ca9
Add trailing comma test case for hugging parens (#3991) 2023-10-27 12:17:54 -07:00
Gabriel Perren
caef19689b
Update current_style.md (#3990)
Fix small typo
2023-10-27 11:54:31 -07:00
Surav Shrestha
7bfa35cca8
docs: fix typos in change log and documentations (#3985) 2023-10-26 21:26:47 -07:00
Ikko Eltociear Ashimine
f7174bfc43
Fix typo in future_style.md (#3979)
parantheses -> parentheses
2023-10-26 09:43:42 -07:00
Henri Holopainen
878937bcc3
[2213] Add support for single line format skip with other comments on the same line (#3959) 2023-10-25 09:47:21 -07:00
Henri Holopainen
1d4c31aa58
[925] Improve multiline dictionary and list indentation for sole function parameter (#3964) 2023-10-25 08:35:37 -07:00
Cooper Lees
744d23b348
Prepare release 23.10.1 (#3969)
* Prepare release 23.10.1

* Update docs/usage_and_configuration/the_basics.md

Add missed version string

We need to automate or remove this from docs ... It's painful.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>

---------

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-10-23 10:59:16 -07:00
William Moreno
c0adca321d
docs: specifies the use of the .git-blame-ignore-revs file (#3961) 2023-10-23 10:21:58 -07:00
Cooper Lees
d291c2338c
Move Docker image to hatch + compile (#3965) 2023-10-23 08:36:47 -07:00
Henri Holopainen
882d8795c6
Fix merging implicit multiline strings that have inline comments (#3956)
* Fix test behaviour

* Add new test cases

* Skip merging strings that have inline comments

* Don't merge lines with multiline strings with inline comments

* Changelog entry

* Document implicit multiline string merging rules

* Fix PR number
2023-10-19 20:09:33 -07:00
Jelle Zijlstra
9edba85f71
Prepare release 23.10.0 (#3951) 2023-10-17 07:22:24 -07:00