Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Gate is_multiline change behind preview#14630

Merged
dhruvmanila merged 1 commit into
mainfrom
dhruv/f-string-multiline-preview
Nov 27, 2024
Merged

Gate is_multiline change behind preview#14630
dhruvmanila merged 1 commit into
mainfrom
dhruv/f-string-multiline-preview

Conversation

@dhruvmanila

@dhruvmanila dhruvmanila commented Nov 27, 2024

Copy link
Copy Markdown
Member

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
context.source().contains_line_break(literal.range())
}
ast::FStringElement::Expression(expression) => {
if is_f_string_formatting_enabled(context) {

Copy link
Copy Markdown
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.

@github-actions

Copy link
Copy Markdown
Contributor

ruff-ecosystem results

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

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