]> 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:

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