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

Gate is_multiline change behind preview #14630

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

dhruvmanila
Copy link
Member

@dhruvmanila dhruvmanila commented Nov 27, 2024

Summary

Ref: #14624 (review)

Test Plan

The test case in the follow-up PR showcases the difference between preview and non-preview formatting: https://github.com/astral-sh/ruff/pull/14624/files#diff-dc25bd4df280d9a9180598075b5bc2d0bac30af956767b373561029309c8f024

@dhruvmanila dhruvmanila added formatter Related to the formatter preview Related to preview mode features labels Nov 27, 2024
@dhruvmanila dhruvmanila marked this pull request as ready for review November 27, 2024 09:47
@@ -119,42 +119,35 @@ impl StringLikeExtensions for ast::StringLike<'_> {
context.source().contains_line_break(literal.range())
}
ast::FStringElement::Expression(expression) => {
if is_f_string_formatting_enabled(context) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change in this diff block removes the else block because the entire function call is behind is_f_string_formatting_enabled check.

Copy link
Contributor

ruff-ecosystem results

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

@dhruvmanila dhruvmanila merged commit 4cd2b99 into main Nov 27, 2024
21 checks passed
@dhruvmanila dhruvmanila deleted the dhruv/f-string-multiline-preview branch November 27, 2024 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
formatter Related to the formatter preview Related to preview mode features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants