Pedro Mezacasa Muller
3e9dd25dad
Fix bug where # fmt: skip is not being respected with one-liner functions ( #4552 )
2025-03-03 15:11:21 -08:00
Jelle Zijlstra
d330deea00
docs: We're not going to use backslashes for the with statement ( #4564 )
2025-01-28 18:29:05 -08:00
cobalt
3d8129001f
Move wrap_long_dict_values_in_parens
to the preview style ( #4561 )
2025-01-27 17:46:13 -08:00
Jelle Zijlstra
c0b92f3888
Prepare the 2025 stable style ( #4558 )
2025-01-24 18:00:35 -08:00
GiGaGon
3fab5ade71
Prevent f-string merge quote changes with nested quotes ( #4498 )
2024-12-03 20:44:26 -08:00
Owen Christie
e54f86bae4
Two blank lines after an import should be reduced to one ( #4489 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-12-03 20:39:35 -08:00
cobalt
96ca1b6be3
fix: Remove parenthesis around sole list items ( #4312 )
2024-11-27 19:59:29 -08:00
Terence Honles
823a7b0ff0
fix: fix PEP 646 support of tuple unpacking ( #4440 )
...
This change fixes unpacking a tuple or generic type when *args is a type
variable tuple.
2024-08-26 08:09:59 -07:00
alwayshang
07fe1ca88a
docs: remove repetitive word ( #4303 )
...
Signed-off-by: alwayshang <zhanghonghao@outlook.com>
2024-04-07 00:18:00 -07: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
Shantanu
ea66d40dd7
Update empty line documentation ( #4239 )
...
Reflects status quo following #4043
Fixes #4238
2024-02-25 16:36:52 -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
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
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
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
4f47cac192
Add --unstable flag ( #4096 )
2024-01-25 17:00:47 -08:00
cobalt
e7e122e9ff
docs: Move fmt: off
docs ( #4090 )
2023-12-09 17:44:15 -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
Henri Holopainen
ddfecf06c1
Hug parens also with multiline unpacking ( #3992 )
2023-10-30 08:35:26 -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
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
Shantanu
e9356c1ff0
Document disabling E704 ( #3888 )
...
Linking #3887
2023-09-13 00:40:41 -07:00
rax
6123b4ac26
Document shebang comment behaviour ( #3787 )
2023-07-11 12:16:43 -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
Jelle Zijlstra
3decbd6db9
Document each configuration option in more detail ( #2839 )
2023-05-24 19:55:12 -07:00
Harutaka Kawamura
a552f7096a
Fix an example for 'Improved parentheses management' in the (future of the) Black code style ( #3635 )
2023-04-03 06:56:59 -07:00
dependabot[bot]
3a9d6f0a5f
Bump myst-parser from 0.18.1 to 1.0.0 in /docs ( #3601 )
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Richard Si <sichard26@gmail.com>
2023-03-19 18:52:40 -04:00
Aneesh Agrawal
4a063a9f8d
Improve multiline string handling ( #1879 )
...
Co-authored-by: Olivia Hong <ohong@lyft.com>
Co-authored-by: Olivia Hong <24500729+olivia-hong@users.noreply.github.com>
2023-03-07 11:52:19 -08:00
Richard Si
e506c46f7b
Rename design label to style because it's clearer ( #3547 )
2023-02-04 22:51:46 -05:00
Yilei "Dolee" Yang
ea5293b036
Document the future style changes introduced in #3489 and #3440 ( #3541 )
2023-02-04 22:30:47 -05:00
Jelle Zijlstra
c4bd2e31ce
Draft for Black 2023 stable style ( #3418 )
2023-01-31 15:39:56 -08:00
Yilei "Dolee" Yang
d950f15987
Update document now that paren wrapping CMs on Python 3.9+ is implemented ( #3520 )
2023-01-23 21:38:30 -08:00
Yilei "Dolee" Yang
f758010340
Documentation: clarify the state of multiple context managers ( #3488 )
...
Clarify that the backslash & paren-wrapping formatting for multiple
context managers aren't yet implemented.
2023-01-14 12:51:59 -05:00
sckarlin
27932494bc
Wordsmith current_style.md ( #3383 )
...
"realtime" doesn't make sense in this context.
2022-11-14 07:31:43 -08:00
Maximilian Cosmo Sitter
c23a5c15aa
Clarify that Black runs with --safe by default ( #3378 )
2022-11-10 10:14:48 -05:00
Yilei "Dolee" Yang
4abc0399b5
Enforce empty lines before classes/functions with sticky leading comments. ( #3302 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-10-25 18:03:24 -07:00
KotlinIsland
0359b85b58
Preserve crlf line endings in blackd ( #3257 )
...
Co-authored-by: KotlinIsland <kotlinisland@users.noreply.github.com>
2022-10-04 13:10:11 -07:00
Blandes22
4c99900236
Make context manager examples in future style docs consistent ( #3274 )
2022-09-22 20:19:31 -07:00
Tom Fryers
04bce6ad2e
Improve order of paragraphs on line splitting ( #3270 )
...
These two paragraphs were tucked away at the end of the section, after
the diversion on backslashes. I nearly missed the first paragraph and
opened a nonsense issue, and I think the second belongs higher up with
it too.
2022-09-14 22:31:26 -04:00
James Salvatore
095fe0d649
docs: adds ExitStack alternative to future_style.md ( #3247 )
...
Co-authored-by: Richard Si <63936253+ichard26@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-08-31 21:25:13 -07:00
Richard Si
7757078ecd
Improve & update release process to reflect recent changes ( #3242 )
...
- Formalise release cadence guidelines
- Overhaul release steps to be easier to follow and more thorough
- Reorder changelog template to something more sensible
- Update release automation docs to reflect recent improvements (notably
the addition of in-repo mypyc wheel builds)
Co-authored-by: Felix Hildén <felix.hilden@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-08-31 14:46:48 -07:00