Skip to content

Commit

Permalink
Clarify that Black runs with --safe by default (#3378)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcsitter authored and ichard26 committed Nov 10, 2022
1 parent 8091b25 commit c23a5c1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/the_black_code_style/current_style.md
Original file line number Diff line number Diff line change
Expand Up @@ -457,9 +457,9 @@ the latter are treated as true raw strings with no special semantics.

### AST before and after formatting

When run with `--safe`, _Black_ checks that the code before and after is semantically
equivalent. This check is done by comparing the AST of the source with the AST of the
target. There are three limited cases in which the AST does differ:
When run with `--safe` (the default), _Black_ checks that the code before and after is
semantically equivalent. This check is done by comparing the AST of the source with the
AST of the target. There are three limited cases in which the AST does differ:

1. _Black_ cleans up leading and trailing whitespace of docstrings, re-indenting them if
needed. It's been one of the most popular user-reported features for the formatter to
Expand Down

0 comments on commit c23a5c1

Please sign in to comment.