Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update discussion of AST safety check in README #2159

Merged
merged 2 commits into from Apr 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGES.md
Expand Up @@ -2,6 +2,11 @@

### Unreleased

#### _Black_

- Clarify that _Black_ may change the AST, especially when cleaning up docstrings.
(#2159)

#### _Packaging_

- Install `primer.json` (used by `black-primer` by default) with black. (#2154)
Expand Down
6 changes: 4 additions & 2 deletions README.md
Expand Up @@ -238,8 +238,10 @@ change in the future**. That being said, no drastic stylistic changes are planne
mostly responses to bug reports.

Also, as a temporary safety measure, _Black_ will check that the reformatted code still
produces a valid AST that is equivalent to the original. This slows it down. If you're
feeling confident, use `--fast`.
produces a valid AST that is mostly equivalent to the original. This slows it down. If
you're feeling confident, use `--fast`. In a few contexts, Black does make changes to
the AST: it cleans up whitespace in docstrings, adds or removes parentheses in some
`del` statements, and may move around type comments.

## The _Black_ code style

Expand Down