-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Do not wrap implicitly concatenated strings used as func args in parens. #3640
Conversation
diff-shades results comparing this PR (968bb6c) to main (a552f70). The full diff is available in the logs under the "Generate HTML diff report" step.
|
@JelleZijlstra any opinion on this? I think the preview string processing overall is a very big change, so I think reverting #3307 would be beneficial to get it in the 2024 stable style. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, let's change this back for now.
Summary: I thought using the `--preview` flag would make the future transition from black 23.X to 24.X smoother, but unfortunately it is not as stable as I imagined. There is no guarantee that the result of running the linter with this flag will not change on minor upgrade, as we just saw with black 23.7.0 reverting a rule for string formatting (psf/black#3640). The result in this diff was obtained in two steps: - adopt the latest expected future style for multiline concatatenated strings, by first running `arc lint --everything` after upgrading black to 23.7.0 - remove the `--preview` flag from `.arclint`, and rerun `arc lint --everything` The second step does not revert the first one because manually splitting long strings over multiple lines is already compatible with `black` 23.X (it just won't do it automatically for you). Test Plan: check we get the same result for all 23.X versions: ``` pip index versions black for version in 23.1.0 23.3.0 23.7.0 do pip install black==${version} arc lint --everything done ``` Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Subscribers: Fabien Differential Revision: https://reviews.bitcoinabc.org/D14294
Summary: I thought using the `--preview` flag would make the future transition from black 23.X to 24.X smoother, but unfortunately it is not as stable as I imagined. There is no guarantee that the result of running the linter with this flag will not change on minor upgrade, as we just saw with black 23.7.0 reverting a rule for string formatting (psf/black#3640). The result in this diff was obtained in two steps: - adopt the latest expected future style for multiline concatatenated strings, by first running `arc lint --everything` after upgrading black to 23.7.0 - remove the `--preview` flag from `.arclint`, and rerun `arc lint --everything` The second step does not revert the first one because manually splitting long strings over multiple lines is already compatible with `black` 23.X (it just won't do it automatically for you). Test Plan: check we get the same result for all 23.X versions: ``` pip index versions black for version in 23.1.0 23.3.0 23.7.0 do pip install black==${version} arc lint --everything done ``` Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Subscribers: Fabien Differential Revision: https://reviews.bitcoinabc.org/D14294
Summary: I thought using the `--preview` flag would make the future transition from black 23.X to 24.X smoother, but unfortunately it is not as stable as I imagined. There is no guarantee that the result of running the linter with this flag will not change on minor upgrade, as we just saw with black 23.7.0 reverting a rule for string formatting (psf/black#3640). The result in this diff was obtained in two steps: - adopt the latest expected future style for multiline concatatenated strings, by first running `arc lint --everything` after upgrading black to 23.7.0 - remove the `--preview` flag from `.arclint`, and rerun `arc lint --everything` The second step does not revert the first one because manually splitting long strings over multiple lines is already compatible with `black` 23.X (it just won't do it automatically for you). Test Plan: check we get the same result for all 23.X versions: ``` pip index versions black for version in 23.1.0 23.3.0 23.7.0 do pip install black==${version} arc lint --everything done ``` Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Subscribers: Fabien Differential Revision: https://reviews.bitcoinabc.org/D14294
Summary: I thought using the `--preview` flag would make the future transition from black 23.X to 24.X smoother, but unfortunately it is not as stable as I imagined. There is no guarantee that the result of running the linter with this flag will not change on minor upgrade, as we just saw with black 23.7.0 reverting a rule for string formatting (psf/black#3640). The result in this diff was obtained in two steps: - adopt the latest expected future style for multiline concatatenated strings, by first running `arc lint --everything` after upgrading black to 23.7.0 - remove the `--preview` flag from `.arclint`, and rerun `arc lint --everything` The second step does not revert the first one because manually splitting long strings over multiple lines is already compatible with `black` 23.X (it just won't do it automatically for you). Test Plan: check we get the same result for all 23.X versions: ``` pip index versions black for version in 23.1.0 23.3.0 23.7.0 do pip install black==${version} arc lint --everything done ``` Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Subscribers: Fabien Differential Revision: https://reviews.bitcoinabc.org/D14294
Summary: I thought using the `--preview` flag would make the future transition from black 23.X to 24.X smoother, but unfortunately it is not as stable as I imagined. There is no guarantee that the result of running the linter with this flag will not change on minor upgrade, as we just saw with black 23.7.0 reverting a rule for string formatting (psf/black#3640). The result in this diff was obtained in two steps: - adopt the latest expected future style for multiline concatatenated strings, by first running `arc lint --everything` after upgrading black to 23.7.0 - remove the `--preview` flag from `.arclint`, and rerun `arc lint --everything` The second step does not revert the first one because manually splitting long strings over multiple lines is already compatible with `black` 23.X (it just won't do it automatically for you). Test Plan: check we get the same result for all 23.X versions: ``` pip index versions black for version in 23.1.0 23.3.0 23.7.0 do pip install black==${version} arc lint --everything done ``` Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Subscribers: Fabien Differential Revision: https://reviews.bitcoinabc.org/D14294
Summary: I thought using the `--preview` flag would make the future transition from black 23.X to 24.X smoother, but unfortunately it is not as stable as I imagined. There is no guarantee that the result of running the linter with this flag will not change on minor upgrade, as we just saw with black 23.7.0 reverting a rule for string formatting (psf/black#3640). The result in this diff was obtained in two steps: - adopt the latest expected future style for multiline concatatenated strings, by first running `arc lint --everything` after upgrading black to 23.7.0 - remove the `--preview` flag from `.arclint`, and rerun `arc lint --everything` The second step does not revert the first one because manually splitting long strings over multiple lines is already compatible with `black` 23.X (it just won't do it automatically for you). Test Plan: check we get the same result for all 23.X versions: ``` pip index versions black for version in 23.1.0 23.3.0 23.7.0 do pip install black==${version} arc lint --everything done ``` Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Subscribers: Fabien Differential Revision: https://reviews.bitcoinabc.org/D14294
Description
This reverts the change in #3307, as the changes that would have been introduced in the 2024 style are too destructive based on feedback. See #2188 (comment).
Checklist - did you ...
CHANGES.md
if necessary?