ruff/crates/ruff_python_formatter/src
Charlie Marsh aea7500c1e
Allow Locator#slice to take Ranged (#6922)
## Summary

As a small quality-of-life improvement, the locator can now slice like
`locator.slice(stmt)` instead of requiring
`locator.slice(stmt.range())`.

## Test Plan

`cargo test`
2023-08-28 11:08:39 -04:00
..
comments Add LineSuffix reserved width (#6830) 2023-08-28 07:46:54 +02:00
expression Allow Locator#slice to take Ranged (#6922) 2023-08-28 11:08:39 -04:00
module Use the formatter prelude in more files (#6882) 2023-08-25 16:51:07 -04:00
other Move Ranged into ruff_text_size (#6919) 2023-08-27 14:12:51 -04:00
pattern Format PatternMatchOr (#6905) 2023-08-28 08:09:17 +00:00
snapshots Remove exception-handler lexing from unused-bound-exception fix (#5851) 2023-07-18 18:27:46 +00:00
statement Move Ranged into ruff_text_size (#6919) 2023-08-27 14:12:51 -04:00
type_param Move Ranged into ruff_text_size (#6919) 2023-08-27 14:12:51 -04:00
builders.rs Move Ranged into ruff_text_size (#6919) 2023-08-27 14:12:51 -04:00
cli.rs Formatter: Add SourceType to context to enable special formatting for stub files (#6331) 2023-08-04 11:52:26 +00:00
context.rs Implement DerefMut for WithNodeLevel (#6443) 2023-08-11 10:41:48 +00:00
generated.rs Introduce AST nodes for PatternMatchClass arguments (#6881) 2023-08-26 14:45:44 +00:00
lib.rs Format PatternMatchOr (#6905) 2023-08-28 08:09:17 +00:00
main.rs Formatter: Add SourceType to context to enable special formatting for stub files (#6331) 2023-08-04 11:52:26 +00:00
options.rs Unify line size settings between ruff and the formatter (#6873) 2023-08-28 06:44:56 +00:00
prelude.rs Accept any Into<AnyNodeRef> as Comments arguments (#5205) 2023-06-20 16:49:21 +00:00
verbatim.rs Move Ranged into ruff_text_size (#6919) 2023-08-27 14:12:51 -04:00