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

Add --experimental-string-processing to future changes #2273

Merged
merged 3 commits into from May 29, 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
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -23,6 +23,7 @@

### Documentation

- `--experimental-string-processing` will be enabled by default in the future (#2273)
- Fix typos discovered by codespell (#2228)
- Fix Vim plugin installation instructions. (#2235)
- Add new Frequently Asked Questions page (#2247)
Expand Down
2 changes: 2 additions & 0 deletions docs/the_black_code_style/current_style.md
Expand Up @@ -250,6 +250,8 @@ If you are adopting _Black_ in a large project with pre-existing string conventi
you can pass `--skip-string-normalization` on the command line. This is meant as an
adoption helper, avoid using this for new projects.

(labels/experimental-string)=

As an experimental option (can be enabled by `--experimental-string-processing`),
_Black_ splits long strings (using parentheses where appropriate) and merges short ones.
When split, parts of f-strings that don't need formatting are converted to plain
Expand Down
7 changes: 7 additions & 0 deletions docs/the_black_code_style/future_style.md
Expand Up @@ -33,3 +33,10 @@ with \

Although when the target version is Python 3.9 or higher, _Black_ will use parentheses
instead since they're allowed in Python 3.9 and higher.

## Improved string processing

Currently, _Black_ does not split long strings to fit the line length limit. Currently,
there is [an experimental option](labels/experimental-string) to enable splitting
strings. We plan to enable this option by default once it is fully stable. This is
tracked in [this issue](https://github.com/psf/black/issues/2188).