1
1
# Change Log
2
2
3
- ## Unreleased
3
+ ## 23.11.0
4
4
5
5
### Highlights
6
6
7
- <!-- Include any especially major or disruptive changes here -->
8
-
9
7
- Support formatting ranges of lines with the new ` --line-ranges ` command-line option
10
- (#4020 ).
8
+ (#4020 )
11
9
12
10
### Stable style
13
11
14
12
- Fix crash on formatting bytes strings that look like docstrings (#4003 )
15
13
- Fix crash when whitespace followed a backslash before newline in a docstring (#4008 )
16
14
- Fix standalone comments inside complex blocks crashing Black (#4016 )
17
-
18
15
- Fix crash on formatting code like ` await (a ** b) ` (#3994 )
19
-
20
16
- No longer treat leading f-strings as docstrings. This matches Python's behaviour and
21
17
fixes a crash (#4019 )
22
18
23
19
### Preview style
24
20
25
- - Multiline dictionaries and lists that are the sole argument to a function are now
26
- indented less (#3964 )
27
- - Multiline list and dict unpacking as the sole argument to a function is now also
21
+ - Multiline dicts and lists that are the sole argument to a function are now indented
22
+ less (#3964 )
23
+ - Multiline unpacked dicts and lists as the sole argument to a function are now also
28
24
indented less (#3992 )
29
- - In f-string debug expressions preserve quote types that are visible in the final
30
- string (#4005 )
25
+ - In f-string debug expressions, quote types that are visible in the final string are
26
+ now preserved (#4005 )
31
27
- Fix a bug where long ` case ` blocks were not split into multiple lines. Also enable
32
28
general trailing comma rules on ` case ` blocks (#4024 )
33
29
- Keep requiring two empty lines between module-level docstring and first function or
34
- class definition. (#4028 )
30
+ class definition (#4028 )
31
+ - Add support for single-line format skip with other comments on the same line (#3959 )
35
32
36
33
### Configuration
37
34
38
- - Add support for single-line format skip with other comments on the same line (#3959 )
39
35
- Consistently apply force exclusion logic before resolving symlinks (#4015 )
40
36
- Fix a bug in the matching of absolute path names in ` --include ` (#3976 )
41
37
42
- ### Packaging
43
-
44
- <!-- Changes to how Black is packaged, such as dependency requirements -->
45
-
46
- ### Parser
47
-
48
- <!-- Changes to the parser or to version autodetection -->
49
-
50
38
### Performance
51
39
52
- <!-- Changes that improve Black's performance. -->
53
-
54
40
- Fix mypyc builds on arm64 on macOS (#4017 )
55
41
56
- ### Output
57
-
58
- <!-- Changes to Black's terminal output and error messages -->
59
-
60
- ### _ Blackd_
61
-
62
- <!-- Changes to blackd -->
63
-
64
42
### Integrations
65
43
66
- <!-- For example, Docker, GitHub Actions, pre-commit, editors -->
67
-
68
44
- Black's pre-commit integration will now run only on git hooks appropriate for a code
69
45
formatter (#3940 )
70
46
71
- ### Documentation
72
-
73
- <!-- Major changes to documentation and policies. Small docs changes
74
- don't need a changelog entry. -->
75
-
76
47
## 23.10.1
77
48
78
49
### Highlights
@@ -327,8 +298,6 @@ versions separately.
327
298
328
299
### Stable style
329
300
330
- <!-- Changes that affect Black's stable style -->
331
-
332
301
- Introduce the 2023 stable style, which incorporates most aspects of last year's
333
302
preview style (#3418 ). Specific changes:
334
303
- Enforce empty lines before classes and functions with sticky leading comments
@@ -362,8 +331,6 @@ versions separately.
362
331
363
332
### Preview style
364
333
365
- <!-- Changes that affect Black's preview style -->
366
-
367
334
- Format hex codes in unicode escape sequences in string literals (#2916 )
368
335
- Add parentheses around ` if ` -` else ` expressions (#2278 )
369
336
- Improve performance on large expressions that contain many strings (#3467 )
@@ -394,15 +361,11 @@ versions separately.
394
361
395
362
### Configuration
396
363
397
- <!-- Changes to how Black can be configured -->
398
-
399
364
- Black now tries to infer its ` --target-version ` from the project metadata specified in
400
365
` pyproject.toml ` (#3219 )
401
366
402
367
### Packaging
403
368
404
- <!-- Changes to how Black is packaged, such as dependency requirements -->
405
-
406
369
- Upgrade mypyc from ` 0.971 ` to ` 0.991 ` so mypycified _ Black_ can be built on armv7
407
370
(#3380 )
408
371
- This also fixes some crashes while using compiled Black with a debug build of
@@ -415,8 +378,6 @@ versions separately.
415
378
416
379
### Output
417
380
418
- <!-- Changes to Black's terminal output and error messages -->
419
-
420
381
- Calling ` black --help ` multiple times will return the same help contents each time
421
382
(#3516 )
422
383
- Verbose logging now shows the values of ` pyproject.toml ` configuration variables
@@ -426,25 +387,18 @@ versions separately.
426
387
427
388
### Integrations
428
389
429
- <!-- For example, Docker, GitHub Actions, pre-commit, editors -->
430
-
431
390
- Move 3.11 CI to normal flow now that all dependencies support 3.11 (#3446 )
432
391
- Docker: Add new ` latest_prerelease ` tag automation to follow latest black alpha
433
392
release on docker images (#3465 )
434
393
435
394
### Documentation
436
395
437
- <!-- Major changes to documentation and policies. Small docs changes
438
- don't need a changelog entry. -->
439
-
440
396
- Expand ` vim-plug ` installation instructions to offer more explicit options (#3468 )
441
397
442
398
## 22.12.0
443
399
444
400
### Preview style
445
401
446
- <!-- Changes that affect Black's preview style -->
447
-
448
402
- Enforce empty lines before classes and functions with sticky leading comments (#3302 )
449
403
- Reformat empty and whitespace-only files as either an empty file (if no newline is
450
404
present) or as a single newline character (if a newline is present) (#3348 )
@@ -457,25 +411,19 @@ versions separately.
457
411
458
412
### Configuration
459
413
460
- <!-- Changes to how Black can be configured -->
461
-
462
414
- Fix incorrectly applied ` .gitignore ` rules by considering the ` .gitignore ` location
463
415
and the relative path to the target file (#3338 )
464
416
- Fix incorrectly ignoring ` .gitignore ` presence when more than one source directory is
465
417
specified (#3336 )
466
418
467
419
### Parser
468
420
469
- <!-- Changes to the parser or to version autodetection -->
470
-
471
421
- Parsing support has been added for walruses inside generator expression that are
472
422
passed as function args (for example,
473
423
` any(match := my_re.match(text) for text in texts) ` ) (#3327 ).
474
424
475
425
### Integrations
476
426
477
- <!-- For example, Docker, GitHub Actions, pre-commit, editors -->
478
-
479
427
- Vim plugin: Optionally allow using the system installation of Black via
480
428
` let g:black_use_virtualenv = 0 ` (#3309 )
481
429
0 commit comments