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 tests demonstrating f-strings with debug expressions in replacements that contain escaped characters #14929

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

MichaReiser
Copy link
Member

Summary

This PR adds two test cases that were reported in #14766 and #14926

Test Plan

cargo test

@MichaReiser MichaReiser added the internal An internal refactor or improvement label Dec 12, 2024
Comment on lines -180 to -181
let options = PyFormatOptions::from_extension(input_path);
let formatted_code = format_file(&content, &options, input_path);
Copy link
Member Author

Choose a reason for hiding this comment

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

Ha, that took me a minute to figure out. We always formatted the code once with the default options even if there's an options file. We don't want that, so I moved it into the else branch`

@MichaReiser MichaReiser enabled auto-merge (squash) December 12, 2024 09:29
@MichaReiser MichaReiser merged commit 82faa9b into main Dec 12, 2024
20 checks passed
@MichaReiser MichaReiser deleted the micha/fstring-debug-expression-tests branch December 12, 2024 09:33
Copy link
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
internal An internal refactor or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant