ruff/crates/ruff_python_trivia/src
Dan Parizher 89ca493fd9
[ruff] Preserve relative whitespace in multi-line expressions (RUF033) (#19647)
## Summary

Fixes #19581

I decided to add in a `indent_first_line` function into
[`textwrap.rs`](https://github.com/astral-sh/ruff/blob/main/crates/ruff_python_trivia/src/textwrap.rs),
as it solely focuses on text manipulation utilities. It follows the same
design as `indent()`, and there may be situations in the future where it
can be reused as well.

---------

Co-authored-by: Brent Westbrook <36778786+ntBre@users.noreply.github.com>
Co-authored-by: Brent Westbrook <brentrwestbrook@gmail.com>
2025-08-27 19:15:44 +00:00
..
comment_ranges.rs Extract LineIndex independent methods from Locator (#13938) 2024-10-28 07:53:41 +00:00
comments.rs Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
cursor.rs Add offset method to ruff_python_trivia::Cursor (#18371) 2025-05-29 16:08:15 +01:00
lib.rs Implement RUF028 to detect useless formatter suppression comments (#9899) 2024-02-28 19:21:06 +00:00
pragmas.rs Treat ty: comments as pragma comments (#18532) 2025-06-07 16:02:43 +02:00
textwrap.rs [ruff] Preserve relative whitespace in multi-line expressions (RUF033) (#19647) 2025-08-27 19:15:44 +00:00
tokenizer.rs Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
whitespace.rs Extract LineIndex independent methods from Locator (#13938) 2024-10-28 07:53:41 +00:00