]> git.madduck.net Git - etc/vim.git/blob - CHANGES.md

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Avoid importing `IPython` if notebook cells do not contain magics (#3782)
[etc/vim.git] / CHANGES.md
1 # Change Log
2
3 ## Unreleased
4
5 ### Highlights
6
7 <!-- Include any especially major or disruptive changes here -->
8
9 ### Stable style
10
11 <!-- Changes that affect Black's stable style -->
12
13 ### Preview style
14
15 <!-- Changes that affect Black's preview style -->
16
17 ### Configuration
18
19 <!-- Changes to how Black can be configured -->
20
21 ### Packaging
22
23 <!-- Changes to how Black is packaged, such as dependency requirements -->
24
25 ### Parser
26
27 <!-- Changes to the parser or to version autodetection -->
28
29 ### Performance
30
31 <!-- Changes that improve Black's performance. -->
32
33 - Avoid importing `IPython` if notebook cells do not contain magics (#3782)
34
35 ### Output
36
37 <!-- Changes to Black's terminal output and error messages -->
38
39 ### _Blackd_
40
41 <!-- Changes to blackd -->
42
43 ### Integrations
44
45 <!-- For example, Docker, GitHub Actions, pre-commit, editors -->
46
47 ### Documentation
48
49 <!-- Major changes to documentation and policies. Small docs changes
50      don't need a changelog entry. -->
51
52 ## 23.7.0
53
54 ### Highlights
55
56 - Runtime support for Python 3.7 has been removed. Formatting 3.7 code will still be
57   supported until further notice (#3765)
58
59 ### Stable style
60
61 - Fix a bug where an illegal trailing comma was added to return type annotations using
62   PEP 604 unions (#3735)
63 - Fix several bugs and crashes where comments in stub files were removed or mishandled
64   under some circumstances (#3745)
65 - Fix a crash with multi-line magic comments like `type: ignore` within parentheses
66   (#3740)
67 - Fix error in AST validation when _Black_ removes trailing whitespace in a type comment
68   (#3773)
69
70 ### Preview style
71
72 - Implicitly concatenated strings used as function args are no longer wrapped inside
73   parentheses (#3640)
74 - Remove blank lines between a class definition and its docstring (#3692)
75
76 ### Configuration
77
78 - The `--workers` argument to _Black_ can now be specified via the `BLACK_NUM_WORKERS`
79   environment variable (#3743)
80 - `.pytest_cache`, `.ruff_cache` and `.vscode` are now excluded by default (#3691)
81 - Fix _Black_ not honouring `pyproject.toml` settings when running `--stdin-filename`
82   and the `pyproject.toml` found isn't in the current working directory (#3719)
83 - _Black_ will now error if `exclude` and `extend-exclude` have invalid data types in
84   `pyproject.toml`, instead of silently doing the wrong thing (#3764)
85
86 ### Packaging
87
88 - Upgrade mypyc from 0.991 to 1.3 (#3697)
89 - Remove patching of Click that mitigated errors on Python 3.6 with `LANG=C` (#3768)
90
91 ### Parser
92
93 - Add support for the new PEP 695 syntax in Python 3.12 (#3703)
94
95 ### Performance
96
97 - Speed up _Black_ significantly when the cache is full (#3751)
98 - Avoid importing `IPython` in a case where we wouldn't need it (#3748)
99
100 ### Output
101
102 - Use aware UTC datetimes internally, avoids deprecation warning on Python 3.12 (#3728)
103 - Change verbose logging to exactly mirror _Black_'s logic for source discovery (#3749)
104
105 ### _Blackd_
106
107 - The `blackd` argument parser now shows the default values for options in their help
108   text (#3712)
109
110 ### Integrations
111
112 - Black is now tested with
113   [`PYTHONWARNDEFAULTENCODING = 1`](https://docs.python.org/3/library/io.html#io-encoding-warning)
114   (#3763)
115 - Update GitHub Action to display black output in the job summary (#3688)
116
117 ### Documentation
118
119 - Add a CITATION.cff file to the root of the repository, containing metadata on how to
120   cite this software (#3723)
121 - Update the _classes_ and _exceptions_ documentation in Developer reference to match
122   the latest code base (#3755)
123
124 ## 23.3.0
125
126 ### Highlights
127
128 This release fixes a longstanding confusing behavior in Black's GitHub action, where the
129 version of the action did not determine the version of Black being run (issue #3382). In
130 addition, there is a small bug fix around imports and a number of improvements to the
131 preview style.
132
133 Please try out the
134 [preview style](https://black.readthedocs.io/en/stable/the_black_code_style/future_style.html#preview-style)
135 with `black --preview` and tell us your feedback. All changes in the preview style are
136 expected to become part of Black's stable style in January 2024.
137
138 ### Stable style
139
140 - Import lines with `# fmt: skip` and `# fmt: off` no longer have an extra blank line
141   added when they are right after another import line (#3610)
142
143 ### Preview style
144
145 - Add trailing commas to collection literals even if there's a comment after the last
146   entry (#3393)
147 - `async def`, `async for`, and `async with` statements are now formatted consistently
148   compared to their non-async version. (#3609)
149 - `with` statements that contain two context managers will be consistently wrapped in
150   parentheses (#3589)
151 - Let string splitters respect [East Asian Width](https://www.unicode.org/reports/tr11/)
152   (#3445)
153 - Now long string literals can be split after East Asian commas and periods (`、` U+3001
154   IDEOGRAPHIC COMMA, `。` U+3002 IDEOGRAPHIC FULL STOP, & `,` U+FF0C FULLWIDTH COMMA)
155   besides before spaces (#3445)
156 - For stubs, enforce one blank line after a nested class with a body other than just
157   `...` (#3564)
158 - Improve handling of multiline strings by changing line split behavior (#1879)
159
160 ### Parser
161
162 - Added support for formatting files with invalid type comments (#3594)
163
164 ### Integrations
165
166 - Update GitHub Action to use the version of Black equivalent to action's version if
167   version input is not specified (#3543)
168 - Fix missing Python binary path in autoload script for vim (#3508)
169
170 ### Documentation
171
172 - Document that only the most recent release is supported for security issues;
173   vulnerabilities should be reported through Tidelift (#3612)
174
175 ## 23.1.0
176
177 ### Highlights
178
179 This is the first release of 2023, and following our
180 [stability policy](https://black.readthedocs.io/en/stable/the_black_code_style/index.html#stability-policy),
181 it comes with a number of improvements to our stable style, including improvements to
182 empty line handling, removal of redundant parentheses in several contexts, and output
183 that highlights implicitly concatenated strings better.
184
185 There are also many changes to the preview style; try out `black --preview` and give us
186 feedback to help us set the stable style for next year.
187
188 In addition to style changes, Black now automatically infers the supported Python
189 versions from your `pyproject.toml` file, removing the need to set Black's target
190 versions separately.
191
192 ### Stable style
193
194 <!-- Changes that affect Black's stable style -->
195
196 - Introduce the 2023 stable style, which incorporates most aspects of last year's
197   preview style (#3418). Specific changes:
198   - Enforce empty lines before classes and functions with sticky leading comments
199     (#3302) (22.12.0)
200   - Reformat empty and whitespace-only files as either an empty file (if no newline is
201     present) or as a single newline character (if a newline is present) (#3348)
202     (22.12.0)
203   - Implicitly concatenated strings used as function args are now wrapped inside
204     parentheses (#3307) (22.12.0)
205   - Correctly handle trailing commas that are inside a line's leading non-nested parens
206     (#3370) (22.12.0)
207   - `--skip-string-normalization` / `-S` now prevents docstring prefixes from being
208     normalized as expected (#3168) (since 22.8.0)
209   - When using `--skip-magic-trailing-comma` or `-C`, trailing commas are stripped from
210     subscript expressions with more than 1 element (#3209) (22.8.0)
211   - Implicitly concatenated strings inside a list, set, or tuple are now wrapped inside
212     parentheses (#3162) (22.8.0)
213   - Fix a string merging/split issue when a comment is present in the middle of
214     implicitly concatenated strings on its own line (#3227) (22.8.0)
215   - Docstring quotes are no longer moved if it would violate the line length limit
216     (#3044, #3430) (22.6.0)
217   - Parentheses around return annotations are now managed (#2990) (22.6.0)
218   - Remove unnecessary parentheses around awaited objects (#2991) (22.6.0)
219   - Remove unnecessary parentheses in `with` statements (#2926) (22.6.0)
220   - Remove trailing newlines after code block open (#3035) (22.6.0)
221   - Code cell separators `#%%` are now standardised to `# %%` (#2919) (22.3.0)
222   - Remove unnecessary parentheses from `except` statements (#2939) (22.3.0)
223   - Remove unnecessary parentheses from tuple unpacking in `for` loops (#2945) (22.3.0)
224   - Avoid magic-trailing-comma in single-element subscripts (#2942) (22.3.0)
225 - Fix a crash when a colon line is marked between `# fmt: off` and `# fmt: on` (#3439)
226
227 ### Preview style
228
229 <!-- Changes that affect Black's preview style -->
230
231 - Format hex codes in unicode escape sequences in string literals (#2916)
232 - Add parentheses around `if`-`else` expressions (#2278)
233 - Improve performance on large expressions that contain many strings (#3467)
234 - Fix a crash in preview style with assert + parenthesized string (#3415)
235 - Fix crashes in preview style with walrus operators used in function return annotations
236   and except clauses (#3423)
237 - Fix a crash in preview advanced string processing where mixed implicitly concatenated
238   regular and f-strings start with an empty span (#3463)
239 - Fix a crash in preview advanced string processing where a standalone comment is placed
240   before a dict's value (#3469)
241 - Fix an issue where extra empty lines are added when a decorator has `# fmt: skip`
242   applied or there is a standalone comment between decorators (#3470)
243 - Do not put the closing quotes in a docstring on a separate line, even if the line is
244   too long (#3430)
245 - Long values in dict literals are now wrapped in parentheses; correspondingly
246   unnecessary parentheses around short values in dict literals are now removed; long
247   string lambda values are now wrapped in parentheses (#3440)
248 - Fix two crashes in preview style involving edge cases with docstrings (#3451)
249 - Exclude string type annotations from improved string processing; fix crash when the
250   return type annotation is stringified and spans across multiple lines (#3462)
251 - Wrap multiple context managers in parentheses when targeting Python 3.9+ (#3489)
252 - Fix several crashes in preview style with walrus operators used in `with` statements
253   or tuples (#3473)
254 - Fix an invalid quote escaping bug in f-string expressions where it produced invalid
255   code. Implicitly concatenated f-strings with different quotes can now be merged or
256   quote-normalized by changing the quotes used in expressions. (#3509)
257 - Fix crash on `await (yield)` when Black is compiled with mypyc (#3533)
258
259 ### Configuration
260
261 <!-- Changes to how Black can be configured -->
262
263 - Black now tries to infer its `--target-version` from the project metadata specified in
264   `pyproject.toml` (#3219)
265
266 ### Packaging
267
268 <!-- Changes to how Black is packaged, such as dependency requirements -->
269
270 - Upgrade mypyc from `0.971` to `0.991` so mypycified _Black_ can be built on armv7
271   (#3380)
272   - This also fixes some crashes while using compiled Black with a debug build of
273     CPython
274 - Drop specific support for the `tomli` requirement on 3.11 alpha releases, working
275   around a bug that would cause the requirement not to be installed on any non-final
276   Python releases (#3448)
277 - Black now depends on `packaging` version `22.0` or later. This is required for new
278   functionality that needs to parse part of the project metadata (#3219)
279
280 ### Output
281
282 <!-- Changes to Black's terminal output and error messages -->
283
284 - Calling `black --help` multiple times will return the same help contents each time
285   (#3516)
286 - Verbose logging now shows the values of `pyproject.toml` configuration variables
287   (#3392)
288 - Fix false symlink detection messages in verbose output due to using an incorrect
289   relative path to the project root (#3385)
290
291 ### Integrations
292
293 <!-- For example, Docker, GitHub Actions, pre-commit, editors -->
294
295 - Move 3.11 CI to normal flow now that all dependencies support 3.11 (#3446)
296 - Docker: Add new `latest_prerelease` tag automation to follow latest black alpha
297   release on docker images (#3465)
298
299 ### Documentation
300
301 <!-- Major changes to documentation and policies. Small docs changes
302      don't need a changelog entry. -->
303
304 - Expand `vim-plug` installation instructions to offer more explicit options (#3468)
305
306 ## 22.12.0
307
308 ### Preview style
309
310 <!-- Changes that affect Black's preview style -->
311
312 - Enforce empty lines before classes and functions with sticky leading comments (#3302)
313 - Reformat empty and whitespace-only files as either an empty file (if no newline is
314   present) or as a single newline character (if a newline is present) (#3348)
315 - Implicitly concatenated strings used as function args are now wrapped inside
316   parentheses (#3307)
317 - For assignment statements, prefer splitting the right hand side if the left hand side
318   fits on a single line (#3368)
319 - Correctly handle trailing commas that are inside a line's leading non-nested parens
320   (#3370)
321
322 ### Configuration
323
324 <!-- Changes to how Black can be configured -->
325
326 - Fix incorrectly applied `.gitignore` rules by considering the `.gitignore` location
327   and the relative path to the target file (#3338)
328 - Fix incorrectly ignoring `.gitignore` presence when more than one source directory is
329   specified (#3336)
330
331 ### Parser
332
333 <!-- Changes to the parser or to version autodetection -->
334
335 - Parsing support has been added for walruses inside generator expression that are
336   passed as function args (for example,
337   `any(match := my_re.match(text) for text in texts)`) (#3327).
338
339 ### Integrations
340
341 <!-- For example, Docker, GitHub Actions, pre-commit, editors -->
342
343 - Vim plugin: Optionally allow using the system installation of Black via
344   `let g:black_use_virtualenv = 0`(#3309)
345
346 ## 22.10.0
347
348 ### Highlights
349
350 - Runtime support for Python 3.6 has been removed. Formatting 3.6 code will still be
351   supported until further notice.
352
353 ### Stable style
354
355 - Fix a crash when `# fmt: on` is used on a different block level than `# fmt: off`
356   (#3281)
357
358 ### Preview style
359
360 - Fix a crash when formatting some dicts with parenthesis-wrapped long string keys
361   (#3262)
362
363 ### Configuration
364
365 - `.ipynb_checkpoints` directories are now excluded by default (#3293)
366 - Add `--skip-source-first-line` / `-x` option to ignore the first line of source code
367   while formatting (#3299)
368
369 ### Packaging
370
371 - Executables made with PyInstaller will no longer crash when formatting several files
372   at once on macOS. Native x86-64 executables for macOS are available once again.
373   (#3275)
374 - Hatchling is now used as the build backend. This will not have any effect for users
375   who install Black with its wheels from PyPI. (#3233)
376 - Faster compiled wheels are now available for CPython 3.11 (#3276)
377
378 ### _Blackd_
379
380 - Windows style (CRLF) newlines will be preserved (#3257).
381
382 ### Integrations
383
384 - Vim plugin: add flag (`g:black_preview`) to enable/disable the preview style (#3246)
385 - Update GitHub Action to support formatting of Jupyter Notebook files via a `jupyter`
386   option (#3282)
387 - Update GitHub Action to support use of version specifiers (e.g. `<23`) for Black
388   version (#3265)
389
390 ## 22.8.0
391
392 ### Highlights
393
394 - Python 3.11 is now supported, except for _blackd_ as aiohttp does not support 3.11 as
395   of publishing (#3234)
396 - This is the last release that supports running _Black_ on Python 3.6 (formatting 3.6
397   code will continue to be supported until further notice)
398 - Reword the stability policy to say that we may, in rare cases, make changes that
399   affect code that was not previously formatted by _Black_ (#3155)
400
401 ### Stable style
402
403 - Fix an infinite loop when using `# fmt: on/off` in the middle of an expression or code
404   block (#3158)
405 - Fix incorrect handling of `# fmt: skip` on colon (`:`) lines (#3148)
406 - Comments are no longer deleted when a line had spaces removed around power operators
407   (#2874)
408
409 ### Preview style
410
411 - Single-character closing docstring quotes are no longer moved to their own line as
412   this is invalid. This was a bug introduced in version 22.6.0. (#3166)
413 - `--skip-string-normalization` / `-S` now prevents docstring prefixes from being
414   normalized as expected (#3168)
415 - When using `--skip-magic-trailing-comma` or `-C`, trailing commas are stripped from
416   subscript expressions with more than 1 element (#3209)
417 - Implicitly concatenated strings inside a list, set, or tuple are now wrapped inside
418   parentheses (#3162)
419 - Fix a string merging/split issue when a comment is present in the middle of implicitly
420   concatenated strings on its own line (#3227)
421
422 ### _Blackd_
423
424 - `blackd` now supports enabling the preview style via the `X-Preview` header (#3217)
425
426 ### Configuration
427
428 - Black now uses the presence of debug f-strings to detect target version (#3215)
429 - Fix misdetection of project root and verbose logging of sources in cases involving
430   `--stdin-filename` (#3216)
431 - Immediate `.gitignore` files in source directories given on the command line are now
432   also respected, previously only `.gitignore` files in the project root and
433   automatically discovered directories were respected (#3237)
434
435 ### Documentation
436
437 - Recommend using BlackConnect in IntelliJ IDEs (#3150)
438
439 ### Integrations
440
441 - Vim plugin: prefix messages with `Black: ` so it's clear they come from Black (#3194)
442 - Docker: changed to a /opt/venv installation + added to PATH to be available to
443   non-root users (#3202)
444
445 ### Output
446
447 - Change from deprecated `asyncio.get_event_loop()` to create our event loop which
448   removes DeprecationWarning (#3164)
449 - Remove logging from internal `blib2to3` library since it regularly emits error logs
450   about failed caching that can and should be ignored (#3193)
451
452 ### Parser
453
454 - Type comments are now included in the AST equivalence check consistently so accidental
455   deletion raises an error. Though type comments can't be tracked when running on PyPy
456   3.7 due to standard library limitations. (#2874)
457
458 ### Performance
459
460 - Reduce Black's startup time when formatting a single file by 15-30% (#3211)
461
462 ## 22.6.0
463
464 ### Style
465
466 - Fix unstable formatting involving `#fmt: skip` and `# fmt:skip` comments (notice the
467   lack of spaces) (#2970)
468
469 ### Preview style
470
471 - Docstring quotes are no longer moved if it would violate the line length limit (#3044)
472 - Parentheses around return annotations are now managed (#2990)
473 - Remove unnecessary parentheses around awaited objects (#2991)
474 - Remove unnecessary parentheses in `with` statements (#2926)
475 - Remove trailing newlines after code block open (#3035)
476
477 ### Integrations
478
479 - Add `scripts/migrate-black.py` script to ease introduction of Black to a Git project
480   (#3038)
481
482 ### Output
483
484 - Output Python version and implementation as part of `--version` flag (#2997)
485
486 ### Packaging
487
488 - Use `tomli` instead of `tomllib` on Python 3.11 builds where `tomllib` is not
489   available (#2987)
490
491 ### Parser
492
493 - [PEP 654](https://peps.python.org/pep-0654/#except) syntax (for example,
494   `except *ExceptionGroup:`) is now supported (#3016)
495 - [PEP 646](https://peps.python.org/pep-0646) syntax (for example,
496   `Array[Batch, *Shape]` or `def fn(*args: *T) -> None`) is now supported (#3071)
497
498 ### Vim Plugin
499
500 - Fix `strtobool` function. It didn't parse true/on/false/off. (#3025)
501
502 ## 22.3.0
503
504 ### Preview style
505
506 - Code cell separators `#%%` are now standardised to `# %%` (#2919)
507 - Remove unnecessary parentheses from `except` statements (#2939)
508 - Remove unnecessary parentheses from tuple unpacking in `for` loops (#2945)
509 - Avoid magic-trailing-comma in single-element subscripts (#2942)
510
511 ### Configuration
512
513 - Do not format `__pypackages__` directories by default (#2836)
514 - Add support for specifying stable version with `--required-version` (#2832).
515 - Avoid crashing when the user has no homedir (#2814)
516 - Avoid crashing when md5 is not available (#2905)
517 - Fix handling of directory junctions on Windows (#2904)
518
519 ### Documentation
520
521 - Update pylint config documentation (#2931)
522
523 ### Integrations
524
525 - Move test to disable plugin in Vim/Neovim, which speeds up loading (#2896)
526
527 ### Output
528
529 - In verbose mode, log when _Black_ is using user-level config (#2861)
530
531 ### Packaging
532
533 - Fix Black to work with Click 8.1.0 (#2966)
534 - On Python 3.11 and newer, use the standard library's `tomllib` instead of `tomli`
535   (#2903)
536 - `black-primer`, the deprecated internal devtool, has been removed and copied to a
537   [separate repository](https://github.com/cooperlees/black-primer) (#2924)
538
539 ### Parser
540
541 - Black can now parse starred expressions in the target of `for` and `async for`
542   statements, e.g `for item in *items_1, *items_2: pass` (#2879).
543
544 ## 22.1.0
545
546 At long last, _Black_ is no longer a beta product! This is the first non-beta release
547 and the first release covered by our new
548 [stability policy](https://black.readthedocs.io/en/stable/the_black_code_style/index.html#stability-policy).
549
550 ### Highlights
551
552 - **Remove Python 2 support** (#2740)
553 - Introduce the `--preview` flag (#2752)
554
555 ### Style
556
557 - Deprecate `--experimental-string-processing` and move the functionality under
558   `--preview` (#2789)
559 - For stubs, one blank line between class attributes and methods is now kept if there's
560   at least one pre-existing blank line (#2736)
561 - Black now normalizes string prefix order (#2297)
562 - Remove spaces around power operators if both operands are simple (#2726)
563 - Work around bug that causes unstable formatting in some cases in the presence of the
564   magic trailing comma (#2807)
565 - Use parentheses for attribute access on decimal float and int literals (#2799)
566 - Don't add whitespace for attribute access on hexadecimal, binary, octal, and complex
567   literals (#2799)
568 - Treat blank lines in stubs the same inside top-level `if` statements (#2820)
569 - Fix unstable formatting with semicolons and arithmetic expressions (#2817)
570 - Fix unstable formatting around magic trailing comma (#2572)
571
572 ### Parser
573
574 - Fix mapping cases that contain as-expressions, like `case {"key": 1 | 2 as password}`
575   (#2686)
576 - Fix cases that contain multiple top-level as-expressions, like `case 1 as a, 2 as b`
577   (#2716)
578 - Fix call patterns that contain as-expressions with keyword arguments, like
579   `case Foo(bar=baz as quux)` (#2749)
580 - Tuple unpacking on `return` and `yield` constructs now implies 3.8+ (#2700)
581 - Unparenthesized tuples on annotated assignments (e.g
582   `values: Tuple[int, ...] = 1, 2, 3`) now implies 3.8+ (#2708)
583 - Fix handling of standalone `match()` or `case()` when there is a trailing newline or a
584   comment inside of the parentheses. (#2760)
585 - `from __future__ import annotations` statement now implies Python 3.7+ (#2690)
586
587 ### Performance
588
589 - Speed-up the new backtracking parser about 4X in general (enabled when
590   `--target-version` is set to 3.10 and higher). (#2728)
591 - _Black_ is now compiled with [mypyc](https://github.com/mypyc/mypyc) for an overall 2x
592   speed-up. 64-bit Windows, MacOS, and Linux (not including musl) are supported. (#1009,
593   #2431)
594
595 ### Configuration
596
597 - Do not accept bare carriage return line endings in pyproject.toml (#2408)
598 - Add configuration option (`python-cell-magics`) to format cells with custom magics in
599   Jupyter Notebooks (#2744)
600 - Allow setting custom cache directory on all platforms with environment variable
601   `BLACK_CACHE_DIR` (#2739).
602 - Enable Python 3.10+ by default, without any extra need to specify
603   `--target-version=py310`. (#2758)
604 - Make passing `SRC` or `--code` mandatory and mutually exclusive (#2804)
605
606 ### Output
607
608 - Improve error message for invalid regular expression (#2678)
609 - Improve error message when parsing fails during AST safety check by embedding the
610   underlying SyntaxError (#2693)
611 - No longer color diff headers white as it's unreadable in light themed terminals
612   (#2691)
613 - Text coloring added in the final statistics (#2712)
614 - Verbose mode also now describes how a project root was discovered and which paths will
615   be formatted. (#2526)
616
617 ### Packaging
618
619 - All upper version bounds on dependencies have been removed (#2718)
620 - `typing-extensions` is no longer a required dependency in Python 3.10+ (#2772)
621 - Set `click` lower bound to `8.0.0` (#2791)
622
623 ### Integrations
624
625 - Update GitHub action to support containerized runs (#2748)
626
627 ### Documentation
628
629 - Change protocol in pip installation instructions to `https://` (#2761)
630 - Change HTML theme to Furo primarily for its responsive design and mobile support
631   (#2793)
632 - Deprecate the `black-primer` tool (#2809)
633 - Document Python support policy (#2819)
634
635 ## 21.12b0
636
637 ### _Black_
638
639 - Fix determination of f-string expression spans (#2654)
640 - Fix bad formatting of error messages about EOF in multi-line statements (#2343)
641 - Functions and classes in blocks now have more consistent surrounding spacing (#2472)
642
643 #### Jupyter Notebook support
644
645 - Cell magics are now only processed if they are known Python cell magics. Earlier, all
646   cell magics were tokenized, leading to possible indentation errors e.g. with
647   `%%writefile`. (#2630)
648 - Fix assignment to environment variables in Jupyter Notebooks (#2642)
649
650 #### Python 3.10 support
651
652 - Point users to using `--target-version py310` if we detect 3.10-only syntax (#2668)
653 - Fix `match` statements with open sequence subjects, like `match a, b:` or
654   `match a, *b:` (#2639) (#2659)
655 - Fix `match`/`case` statements that contain `match`/`case` soft keywords multiple
656   times, like `match re.match()` (#2661)
657 - Fix `case` statements with an inline body (#2665)
658 - Fix styling of starred expressions inside `match` subject (#2667)
659 - Fix parser error location on invalid syntax in a `match` statement (#2649)
660 - Fix Python 3.10 support on platforms without ProcessPoolExecutor (#2631)
661 - Improve parsing performance on code that uses `match` under `--target-version py310`
662   up to ~50% (#2670)
663
664 ### Packaging
665
666 - Remove dependency on `regex` (#2644) (#2663)
667
668 ## 21.11b1
669
670 ### _Black_
671
672 - Bumped regex version minimum to 2021.4.4 to fix Pattern class usage (#2621)
673
674 ## 21.11b0
675
676 ### _Black_
677
678 - Warn about Python 2 deprecation in more cases by improving Python 2 only syntax
679   detection (#2592)
680 - Add experimental PyPy support (#2559)
681 - Add partial support for the match statement. As it's experimental, it's only enabled
682   when `--target-version py310` is explicitly specified (#2586)
683 - Add support for parenthesized with (#2586)
684 - Declare support for Python 3.10 for running Black (#2562)
685
686 ### Integrations
687
688 - Fixed vim plugin with Python 3.10 by removing deprecated distutils import (#2610)
689 - The vim plugin now parses `skip_magic_trailing_comma` from pyproject.toml (#2613)
690
691 ## 21.10b0
692
693 ### _Black_
694
695 - Document stability policy, that will apply for non-beta releases (#2529)
696 - Add new `--workers` parameter (#2514)
697 - Fixed feature detection for positional-only arguments in lambdas (#2532)
698 - Bumped typed-ast version minimum to 1.4.3 for 3.10 compatibility (#2519)
699 - Fixed a Python 3.10 compatibility issue where the loop argument was still being passed
700   even though it has been removed (#2580)
701 - Deprecate Python 2 formatting support (#2523)
702
703 ### _Blackd_
704
705 - Remove dependency on aiohttp-cors (#2500)
706 - Bump required aiohttp version to 3.7.4 (#2509)
707
708 ### _Black-Primer_
709
710 - Add primer support for --projects (#2555)
711 - Print primer summary after individual failures (#2570)
712
713 ### Integrations
714
715 - Allow to pass `target_version` in the vim plugin (#1319)
716 - Install build tools in docker file and use multi-stage build to keep the image size
717   down (#2582)
718
719 ## 21.9b0
720
721 ### Packaging
722
723 - Fix missing modules in self-contained binaries (#2466)
724 - Fix missing toml extra used during installation (#2475)
725
726 ## 21.8b0
727
728 ### _Black_
729
730 - Add support for formatting Jupyter Notebook files (#2357)
731 - Move from `appdirs` dependency to `platformdirs` (#2375)
732 - Present a more user-friendly error if .gitignore is invalid (#2414)
733 - The failsafe for accidentally added backslashes in f-string expressions has been
734   hardened to handle more edge cases during quote normalization (#2437)
735 - Avoid changing a function return type annotation's type to a tuple by adding a
736   trailing comma (#2384)
737 - Parsing support has been added for unparenthesized walruses in set literals, set
738   comprehensions, and indices (#2447).
739 - Pin `setuptools-scm` build-time dependency version (#2457)
740 - Exclude typing-extensions version 3.10.0.1 due to it being broken on Python 3.10
741   (#2460)
742
743 ### _Blackd_
744
745 - Replace sys.exit(-1) with raise ImportError as it plays more nicely with tools that
746   scan installed packages (#2440)
747
748 ### Integrations
749
750 - The provided pre-commit hooks no longer specify `language_version` to avoid overriding
751   `default_language_version` (#2430)
752
753 ## 21.7b0
754
755 ### _Black_
756
757 - Configuration files using TOML features higher than spec v0.5.0 are now supported
758   (#2301)
759 - Add primer support and test for code piped into black via STDIN (#2315)
760 - Fix internal error when `FORCE_OPTIONAL_PARENTHESES` feature is enabled (#2332)
761 - Accept empty stdin (#2346)
762 - Provide a more useful error when parsing fails during AST safety checks (#2304)
763
764 ### Docker
765
766 - Add new `latest_release` tag automation to follow latest black release on docker
767   images (#2374)
768
769 ### Integrations
770
771 - The vim plugin now searches upwards from the directory containing the current buffer
772   instead of the current working directory for pyproject.toml. (#1871)
773 - The vim plugin now reads the correct string normalization option in pyproject.toml
774   (#1869)
775 - The vim plugin no longer crashes Black when there's boolean values in pyproject.toml
776   (#1869)
777
778 ## 21.6b0
779
780 ### _Black_
781
782 - Fix failure caused by `fmt: skip` and indentation (#2281)
783 - Account for += assignment when deciding whether to split string (#2312)
784 - Correct max string length calculation when there are string operators (#2292)
785 - Fixed option usage when using the `--code` flag (#2259)
786 - Do not call `uvloop.install()` when _Black_ is used as a library (#2303)
787 - Added `--required-version` option to require a specific version to be running (#2300)
788 - Fix incorrect custom breakpoint indices when string group contains fake f-strings
789   (#2311)
790 - Fix regression where `R` prefixes would be lowercased for docstrings (#2285)
791 - Fix handling of named escapes (`\N{...}`) when `--experimental-string-processing` is
792   used (#2319)
793
794 ### Integrations
795
796 - The official Black action now supports choosing what version to use, and supports the
797   major 3 OSes. (#1940)
798
799 ## 21.5b2
800
801 ### _Black_
802
803 - A space is no longer inserted into empty docstrings (#2249)
804 - Fix handling of .gitignore files containing non-ASCII characters on Windows (#2229)
805 - Respect `.gitignore` files in all levels, not only `root/.gitignore` file (apply
806   `.gitignore` rules like `git` does) (#2225)
807 - Restored compatibility with Click 8.0 on Python 3.6 when LANG=C used (#2227)
808 - Add extra uvloop install + import support if in python env (#2258)
809 - Fix --experimental-string-processing crash when matching parens are not found (#2283)
810 - Make sure to split lines that start with a string operator (#2286)
811 - Fix regular expression that black uses to identify f-expressions (#2287)
812
813 ### _Blackd_
814
815 - Add a lower bound for the `aiohttp-cors` dependency. Only 0.4.0 or higher is
816   supported. (#2231)
817
818 ### Packaging
819
820 - Release self-contained x86_64 MacOS binaries as part of the GitHub release pipeline
821   (#2198)
822 - Always build binaries with the latest available Python (#2260)
823
824 ### Documentation
825
826 - Add discussion of magic comments to FAQ page (#2272)
827 - `--experimental-string-processing` will be enabled by default in the future (#2273)
828 - Fix typos discovered by codespell (#2228)
829 - Fix Vim plugin installation instructions. (#2235)
830 - Add new Frequently Asked Questions page (#2247)
831 - Fix encoding + symlink issues preventing proper build on Windows (#2262)
832
833 ## 21.5b1
834
835 ### _Black_
836
837 - Refactor `src/black/__init__.py` into many files (#2206)
838
839 ### Documentation
840
841 - Replaced all remaining references to the
842   [`master`](https://github.com/psf/black/tree/main) branch with the
843   [`main`](https://github.com/psf/black/tree/main) branch. Some additional changes in
844   the source code were also made. (#2210)
845 - Sigificantly reorganized the documentation to make much more sense. Check them out by
846   heading over to [the stable docs on RTD](https://black.readthedocs.io/en/stable/).
847   (#2174)
848
849 ## 21.5b0
850
851 ### _Black_
852
853 - Set `--pyi` mode if `--stdin-filename` ends in `.pyi` (#2169)
854 - Stop detecting target version as Python 3.9+ with pre-PEP-614 decorators that are
855   being called but with no arguments (#2182)
856
857 ### _Black-Primer_
858
859 - Add `--no-diff` to black-primer to suppress formatting changes (#2187)
860
861 ## 21.4b2
862
863 ### _Black_
864
865 - Fix crash if the user configuration directory is inaccessible. (#2158)
866
867 - Clarify
868   [circumstances](https://github.com/psf/black/blob/master/docs/the_black_code_style.md#pragmatism)
869   in which _Black_ may change the AST (#2159)
870
871 - Allow `.gitignore` rules to be overridden by specifying `exclude` in `pyproject.toml`
872   or on the command line. (#2170)
873
874 ### _Packaging_
875
876 - Install `primer.json` (used by `black-primer` by default) with black. (#2154)
877
878 ## 21.4b1
879
880 ### _Black_
881
882 - Fix crash on docstrings ending with "\\ ". (#2142)
883
884 - Fix crash when atypical whitespace is cleaned out of dostrings (#2120)
885
886 - Reflect the `--skip-magic-trailing-comma` and `--experimental-string-processing` flags
887   in the name of the cache file. Without this fix, changes in these flags would not take
888   effect if the cache had already been populated. (#2131)
889
890 - Don't remove necessary parentheses from assignment expression containing assert /
891   return statements. (#2143)
892
893 ### _Packaging_
894
895 - Bump pathspec to >= 0.8.1 to solve invalid .gitignore exclusion handling
896
897 ## 21.4b0
898
899 ### _Black_
900
901 - Fixed a rare but annoying formatting instability created by the combination of
902   optional trailing commas inserted by `Black` and optional parentheses looking at
903   pre-existing "magic" trailing commas. This fixes issue #1629 and all of its many many
904   duplicates. (#2126)
905
906 - `Black` now processes one-line docstrings by stripping leading and trailing spaces,
907   and adding a padding space when needed to break up """". (#1740)
908
909 - `Black` now cleans up leading non-breaking spaces in comments (#2092)
910
911 - `Black` now respects `--skip-string-normalization` when normalizing multiline
912   docstring quotes (#1637)
913
914 - `Black` no longer removes all empty lines between non-function code and decorators
915   when formatting typing stubs. Now `Black` enforces a single empty line. (#1646)
916
917 - `Black` no longer adds an incorrect space after a parenthesized assignment expression
918   in if/while statements (#1655)
919
920 - Added `--skip-magic-trailing-comma` / `-C` to avoid using trailing commas as a reason
921   to split lines (#1824)
922
923 - fixed a crash when PWD=/ on POSIX (#1631)
924
925 - fixed "I/O operation on closed file" when using --diff (#1664)
926
927 - Prevent coloured diff output being interleaved with multiple files (#1673)
928
929 - Added support for PEP 614 relaxed decorator syntax on python 3.9 (#1711)
930
931 - Added parsing support for unparenthesized tuples and yield expressions in annotated
932   assignments (#1835)
933
934 - added `--extend-exclude` argument (PR #2005)
935
936 - speed up caching by avoiding pathlib (#1950)
937
938 - `--diff` correctly indicates when a file doesn't end in a newline (#1662)
939
940 - Added `--stdin-filename` argument to allow stdin to respect `--force-exclude` rules
941   (#1780)
942
943 - Lines ending with `fmt: skip` will now be not formatted (#1800)
944
945 - PR #2053: Black no longer relies on typed-ast for Python 3.8 and higher
946
947 - PR #2053: Python 2 support is now optional, install with
948   `python3 -m pip install black[python2]` to maintain support.
949
950 - Exclude `venv` directory by default (#1683)
951
952 - Fixed "Black produced code that is not equivalent to the source" when formatting
953   Python 2 docstrings (#2037)
954
955 ### _Packaging_
956
957 - Self-contained native _Black_ binaries are now provided for releases via GitHub
958   Releases (#1743)
959
960 ## 20.8b1
961
962 ### _Packaging_
963
964 - explicitly depend on Click 7.1.2 or newer as `Black` no longer works with versions
965   older than 7.0
966
967 ## 20.8b0
968
969 ### _Black_
970
971 - re-implemented support for explicit trailing commas: now it works consistently within
972   any bracket pair, including nested structures (#1288 and duplicates)
973
974 - `Black` now reindents docstrings when reindenting code around it (#1053)
975
976 - `Black` now shows colored diffs (#1266)
977
978 - `Black` is now packaged using 'py3' tagged wheels (#1388)
979
980 - `Black` now supports Python 3.8 code, e.g. star expressions in return statements
981   (#1121)
982
983 - `Black` no longer normalizes capital R-string prefixes as those have a
984   community-accepted meaning (#1244)
985
986 - `Black` now uses exit code 2 when specified configuration file doesn't exit (#1361)
987
988 - `Black` now works on AWS Lambda (#1141)
989
990 - added `--force-exclude` argument (#1032)
991
992 - removed deprecated `--py36` option (#1236)
993
994 - fixed `--diff` output when EOF is encountered (#526)
995
996 - fixed `# fmt: off` handling around decorators (#560)
997
998 - fixed unstable formatting with some `# type: ignore` comments (#1113)
999
1000 - fixed invalid removal on organizing brackets followed by indexing (#1575)
1001
1002 - introduced `black-primer`, a CI tool that allows us to run regression tests against
1003   existing open source users of Black (#1402)
1004
1005 - introduced property-based fuzzing to our test suite based on Hypothesis and
1006   Hypothersmith (#1566)
1007
1008 - implemented experimental and disabled by default long string rewrapping (#1132),
1009   hidden under a `--experimental-string-processing` flag while it's being worked on;
1010   this is an undocumented and unsupported feature, you lose Internet points for
1011   depending on it (#1609)
1012
1013 ### Vim plugin
1014
1015 - prefer virtualenv packages over global packages (#1383)
1016
1017 ## 19.10b0
1018
1019 - added support for PEP 572 assignment expressions (#711)
1020
1021 - added support for PEP 570 positional-only arguments (#943)
1022
1023 - added support for async generators (#593)
1024
1025 - added support for pre-splitting collections by putting an explicit trailing comma
1026   inside (#826)
1027
1028 - added `black -c` as a way to format code passed from the command line (#761)
1029
1030 - --safe now works with Python 2 code (#840)
1031
1032 - fixed grammar selection for Python 2-specific code (#765)
1033
1034 - fixed feature detection for trailing commas in function definitions and call sites
1035   (#763)
1036
1037 - `# fmt: off`/`# fmt: on` comment pairs placed multiple times within the same block of
1038   code now behave correctly (#1005)
1039
1040 - _Black_ no longer crashes on Windows machines with more than 61 cores (#838)
1041
1042 - _Black_ no longer crashes on standalone comments prepended with a backslash (#767)
1043
1044 - _Black_ no longer crashes on `from` ... `import` blocks with comments (#829)
1045
1046 - _Black_ no longer crashes on Python 3.7 on some platform configurations (#494)
1047
1048 - _Black_ no longer fails on comments in from-imports (#671)
1049
1050 - _Black_ no longer fails when the file starts with a backslash (#922)
1051
1052 - _Black_ no longer merges regular comments with type comments (#1027)
1053
1054 - _Black_ no longer splits long lines that contain type comments (#997)
1055
1056 - removed unnecessary parentheses around `yield` expressions (#834)
1057
1058 - added parentheses around long tuples in unpacking assignments (#832)
1059
1060 - added parentheses around complex powers when they are prefixed by a unary operator
1061   (#646)
1062
1063 - fixed bug that led _Black_ format some code with a line length target of 1 (#762)
1064
1065 - _Black_ no longer introduces quotes in f-string subexpressions on string boundaries
1066   (#863)
1067
1068 - if _Black_ puts parenthesis around a single expression, it moves comments to the
1069   wrapped expression instead of after the brackets (#872)
1070
1071 - `blackd` now returns the version of _Black_ in the response headers (#1013)
1072
1073 - `blackd` can now output the diff of formats on source code when the `X-Diff` header is
1074   provided (#969)
1075
1076 ## 19.3b0
1077
1078 - new option `--target-version` to control which Python versions _Black_-formatted code
1079   should target (#618)
1080
1081 - deprecated `--py36` (use `--target-version=py36` instead) (#724)
1082
1083 - _Black_ no longer normalizes numeric literals to include `_` separators (#696)
1084
1085 - long `del` statements are now split into multiple lines (#698)
1086
1087 - type comments are no longer mangled in function signatures
1088
1089 - improved performance of formatting deeply nested data structures (#509)
1090
1091 - _Black_ now properly formats multiple files in parallel on Windows (#632)
1092
1093 - _Black_ now creates cache files atomically which allows it to be used in parallel
1094   pipelines (like `xargs -P8`) (#673)
1095
1096 - _Black_ now correctly indents comments in files that were previously formatted with
1097   tabs (#262)
1098
1099 - `blackd` now supports CORS (#622)
1100
1101 ## 18.9b0
1102
1103 - numeric literals are now formatted by _Black_ (#452, #461, #464, #469):
1104
1105   - numeric literals are normalized to include `_` separators on Python 3.6+ code
1106
1107   - added `--skip-numeric-underscore-normalization` to disable the above behavior and
1108     leave numeric underscores as they were in the input
1109
1110   - code with `_` in numeric literals is recognized as Python 3.6+
1111
1112   - most letters in numeric literals are lowercased (e.g., in `1e10`, `0x01`)
1113
1114   - hexadecimal digits are always uppercased (e.g. `0xBADC0DE`)
1115
1116 - added `blackd`, see
1117   [its documentation](https://github.com/psf/black/blob/18.9b0/README.md#blackd) for
1118   more info (#349)
1119
1120 - adjacent string literals are now correctly split into multiple lines (#463)
1121
1122 - trailing comma is now added to single imports that don't fit on a line (#250)
1123
1124 - cache is now populated when `--check` is successful for a file which speeds up
1125   consecutive checks of properly formatted unmodified files (#448)
1126
1127 - whitespace at the beginning of the file is now removed (#399)
1128
1129 - fixed mangling [pweave](http://mpastell.com/pweave/) and
1130   [Spyder IDE](https://www.spyder-ide.org/) special comments (#532)
1131
1132 - fixed unstable formatting when unpacking big tuples (#267)
1133
1134 - fixed parsing of `__future__` imports with renames (#389)
1135
1136 - fixed scope of `# fmt: off` when directly preceding `yield` and other nodes (#385)
1137
1138 - fixed formatting of lambda expressions with default arguments (#468)
1139
1140 - fixed `async for` statements: _Black_ no longer breaks them into separate lines (#372)
1141
1142 - note: the Vim plugin stopped registering `,=` as a default chord as it turned out to
1143   be a bad idea (#415)
1144
1145 ## 18.6b4
1146
1147 - hotfix: don't freeze when multiple comments directly precede `# fmt: off` (#371)
1148
1149 ## 18.6b3
1150
1151 - typing stub files (`.pyi`) now have blank lines added after constants (#340)
1152
1153 - `# fmt: off` and `# fmt: on` are now much more dependable:
1154
1155   - they now work also within bracket pairs (#329)
1156
1157   - they now correctly work across function/class boundaries (#335)
1158
1159   - they now work when an indentation block starts with empty lines or misaligned
1160     comments (#334)
1161
1162 - made Click not fail on invalid environments; note that Click is right but the
1163   likelihood we'll need to access non-ASCII file paths when dealing with Python source
1164   code is low (#277)
1165
1166 - fixed improper formatting of f-strings with quotes inside interpolated expressions
1167   (#322)
1168
1169 - fixed unnecessary slowdown when long list literals where found in a file
1170
1171 - fixed unnecessary slowdown on AST nodes with very many siblings
1172
1173 - fixed cannibalizing backslashes during string normalization
1174
1175 - fixed a crash due to symbolic links pointing outside of the project directory (#338)
1176
1177 ## 18.6b2
1178
1179 - added `--config` (#65)
1180
1181 - added `-h` equivalent to `--help` (#316)
1182
1183 - fixed improper unmodified file caching when `-S` was used
1184
1185 - fixed extra space in string unpacking (#305)
1186
1187 - fixed formatting of empty triple quoted strings (#313)
1188
1189 - fixed unnecessary slowdown in comment placement calculation on lines without comments
1190
1191 ## 18.6b1
1192
1193 - hotfix: don't output human-facing information on stdout (#299)
1194
1195 - hotfix: don't output cake emoji on non-zero return code (#300)
1196
1197 ## 18.6b0
1198
1199 - added `--include` and `--exclude` (#270)
1200
1201 - added `--skip-string-normalization` (#118)
1202
1203 - added `--verbose` (#283)
1204
1205 - the header output in `--diff` now actually conforms to the unified diff spec
1206
1207 - fixed long trivial assignments being wrapped in unnecessary parentheses (#273)
1208
1209 - fixed unnecessary parentheses when a line contained multiline strings (#232)
1210
1211 - fixed stdin handling not working correctly if an old version of Click was used (#276)
1212
1213 - _Black_ now preserves line endings when formatting a file in place (#258)
1214
1215 ## 18.5b1
1216
1217 - added `--pyi` (#249)
1218
1219 - added `--py36` (#249)
1220
1221 - Python grammar pickle caches are stored with the formatting caches, making _Black_
1222   work in environments where site-packages is not user-writable (#192)
1223
1224 - _Black_ now enforces a PEP 257 empty line after a class-level docstring (and/or
1225   fields) and the first method
1226
1227 - fixed invalid code produced when standalone comments were present in a trailer that
1228   was omitted from line splitting on a large expression (#237)
1229
1230 - fixed optional parentheses being removed within `# fmt: off` sections (#224)
1231
1232 - fixed invalid code produced when stars in very long imports were incorrectly wrapped
1233   in optional parentheses (#234)
1234
1235 - fixed unstable formatting when inline comments were moved around in a trailer that was
1236   omitted from line splitting on a large expression (#238)
1237
1238 - fixed extra empty line between a class declaration and the first method if no class
1239   docstring or fields are present (#219)
1240
1241 - fixed extra empty line between a function signature and an inner function or inner
1242   class (#196)
1243
1244 ## 18.5b0
1245
1246 - call chains are now formatted according to the
1247   [fluent interfaces](https://en.wikipedia.org/wiki/Fluent_interface) style (#67)
1248
1249 - data structure literals (tuples, lists, dictionaries, and sets) are now also always
1250   exploded like imports when they don't fit in a single line (#152)
1251
1252 - slices are now formatted according to PEP 8 (#178)
1253
1254 - parentheses are now also managed automatically on the right-hand side of assignments
1255   and return statements (#140)
1256
1257 - math operators now use their respective priorities for delimiting multiline
1258   expressions (#148)
1259
1260 - optional parentheses are now omitted on expressions that start or end with a bracket
1261   and only contain a single operator (#177)
1262
1263 - empty parentheses in a class definition are now removed (#145, #180)
1264
1265 - string prefixes are now standardized to lowercase and `u` is removed on Python 3.6+
1266   only code and Python 2.7+ code with the `unicode_literals` future import (#188, #198,
1267   #199)
1268
1269 - typing stub files (`.pyi`) are now formatted in a style that is consistent with PEP
1270   484 (#207, #210)
1271
1272 - progress when reformatting many files is now reported incrementally
1273
1274 - fixed trailers (content with brackets) being unnecessarily exploded into their own
1275   lines after a dedented closing bracket (#119)
1276
1277 - fixed an invalid trailing comma sometimes left in imports (#185)
1278
1279 - fixed non-deterministic formatting when multiple pairs of removable parentheses were
1280   used (#183)
1281
1282 - fixed multiline strings being unnecessarily wrapped in optional parentheses in long
1283   assignments (#215)
1284
1285 - fixed not splitting long from-imports with only a single name
1286
1287 - fixed Python 3.6+ file discovery by also looking at function calls with unpacking.
1288   This fixed non-deterministic formatting if trailing commas where used both in function
1289   signatures with stars and function calls with stars but the former would be
1290   reformatted to a single line.
1291
1292 - fixed crash on dealing with optional parentheses (#193)
1293
1294 - fixed "is", "is not", "in", and "not in" not considered operators for splitting
1295   purposes
1296
1297 - fixed crash when dead symlinks where encountered
1298
1299 ## 18.4a4
1300
1301 - don't populate the cache on `--check` (#175)
1302
1303 ## 18.4a3
1304
1305 - added a "cache"; files already reformatted that haven't changed on disk won't be
1306   reformatted again (#109)
1307
1308 - `--check` and `--diff` are no longer mutually exclusive (#149)
1309
1310 - generalized star expression handling, including double stars; this fixes
1311   multiplication making expressions "unsafe" for trailing commas (#132)
1312
1313 - _Black_ no longer enforces putting empty lines behind control flow statements (#90)
1314
1315 - _Black_ now splits imports like "Mode 3 + trailing comma" of isort (#127)
1316
1317 - fixed comment indentation when a standalone comment closes a block (#16, #32)
1318
1319 - fixed standalone comments receiving extra empty lines if immediately preceding a
1320   class, def, or decorator (#56, #154)
1321
1322 - fixed `--diff` not showing entire path (#130)
1323
1324 - fixed parsing of complex expressions after star and double stars in function calls
1325   (#2)
1326
1327 - fixed invalid splitting on comma in lambda arguments (#133)
1328
1329 - fixed missing splits of ternary expressions (#141)
1330
1331 ## 18.4a2
1332
1333 - fixed parsing of unaligned standalone comments (#99, #112)
1334
1335 - fixed placement of dictionary unpacking inside dictionary literals (#111)
1336
1337 - Vim plugin now works on Windows, too
1338
1339 - fixed unstable formatting when encountering unnecessarily escaped quotes in a string
1340   (#120)
1341
1342 ## 18.4a1
1343
1344 - added `--quiet` (#78)
1345
1346 - added automatic parentheses management (#4)
1347
1348 - added [pre-commit](https://pre-commit.com) integration (#103, #104)
1349
1350 - fixed reporting on `--check` with multiple files (#101, #102)
1351
1352 - fixed removing backslash escapes from raw strings (#100, #105)
1353
1354 ## 18.4a0
1355
1356 - added `--diff` (#87)
1357
1358 - add line breaks before all delimiters, except in cases like commas, to better comply
1359   with PEP 8 (#73)
1360
1361 - standardize string literals to use double quotes (almost) everywhere (#75)
1362
1363 - fixed handling of standalone comments within nested bracketed expressions; _Black_
1364   will no longer produce super long lines or put all standalone comments at the end of
1365   the expression (#22)
1366
1367 - fixed 18.3a4 regression: don't crash and burn on empty lines with trailing whitespace
1368   (#80)
1369
1370 - fixed 18.3a4 regression: `# yapf: disable` usage as trailing comment would cause
1371   _Black_ to not emit the rest of the file (#95)
1372
1373 - when CTRL+C is pressed while formatting many files, _Black_ no longer freaks out with
1374   a flurry of asyncio-related exceptions
1375
1376 - only allow up to two empty lines on module level and only single empty lines within
1377   functions (#74)
1378
1379 ## 18.3a4
1380
1381 - `# fmt: off` and `# fmt: on` are implemented (#5)
1382
1383 - automatic detection of deprecated Python 2 forms of print statements and exec
1384   statements in the formatted file (#49)
1385
1386 - use proper spaces for complex expressions in default values of typed function
1387   arguments (#60)
1388
1389 - only return exit code 1 when --check is used (#50)
1390
1391 - don't remove single trailing commas from square bracket indexing (#59)
1392
1393 - don't omit whitespace if the previous factor leaf wasn't a math operator (#55)
1394
1395 - omit extra space in kwarg unpacking if it's the first argument (#46)
1396
1397 - omit extra space in
1398   [Sphinx auto-attribute comments](http://www.sphinx-doc.org/en/stable/ext/autodoc.html#directive-autoattribute)
1399   (#68)
1400
1401 ## 18.3a3
1402
1403 - don't remove single empty lines outside of bracketed expressions (#19)
1404
1405 - added ability to pipe formatting from stdin to stdin (#25)
1406
1407 - restored ability to format code with legacy usage of `async` as a name (#20, #42)
1408
1409 - even better handling of numpy-style array indexing (#33, again)
1410
1411 ## 18.3a2
1412
1413 - changed positioning of binary operators to occur at beginning of lines instead of at
1414   the end, following
1415   [a recent change to PEP 8](https://github.com/python/peps/commit/c59c4376ad233a62ca4b3a6060c81368bd21e85b)
1416   (#21)
1417
1418 - ignore empty bracket pairs while splitting. This avoids very weirdly looking
1419   formattings (#34, #35)
1420
1421 - remove a trailing comma if there is a single argument to a call
1422
1423 - if top level functions were separated by a comment, don't put four empty lines after
1424   the upper function
1425
1426 - fixed unstable formatting of newlines with imports
1427
1428 - fixed unintentional folding of post scriptum standalone comments into last statement
1429   if it was a simple statement (#18, #28)
1430
1431 - fixed missing space in numpy-style array indexing (#33)
1432
1433 - fixed spurious space after star-based unary expressions (#31)
1434
1435 ## 18.3a1
1436
1437 - added `--check`
1438
1439 - only put trailing commas in function signatures and calls if it's safe to do so. If
1440   the file is Python 3.6+ it's always safe, otherwise only safe if there are no `*args`
1441   or `**kwargs` used in the signature or call. (#8)
1442
1443 - fixed invalid spacing of dots in relative imports (#6, #13)
1444
1445 - fixed invalid splitting after comma on unpacked variables in for-loops (#23)
1446
1447 - fixed spurious space in parenthesized set expressions (#7)
1448
1449 - fixed spurious space after opening parentheses and in default arguments (#14, #17)
1450
1451 - fixed spurious space after unary operators when the operand was a complex expression
1452   (#15)
1453
1454 ## 18.3a0
1455
1456 - first published version, Happy 🍰 Day 2018!
1457
1458 - alpha quality
1459
1460 - date-versioned (see: <https://calver.org/>)