ruff/crates/ruff_python_trivia/src
Dhruv Manilawala f0046ab28e
Move has_comments to CommentRanges (#11495)
## Summary

This PR moves the `has_comments` function from `Indexer` to
`CommentRanges`. The main motivation is that the `CommentRanges` will
now be built by the parser which is shared between the linter and the
formatter. Thus, the `CommentRanges` will be removed from the `Indexer`.

## Test Plan

`cargo test`
2024-05-22 13:35:16 +00:00
..
comment_ranges.rs Move has_comments to CommentRanges (#11495) 2024-05-22 13:35:16 +00:00
comments.rs Implement RUF028 to detect useless formatter suppression comments (#9899) 2024-02-28 19:21:06 +00:00
cursor.rs Use CommentRanges in backwards lexing (#7360) 2023-09-16 03:21:45 +00:00
lib.rs Implement RUF028 to detect useless formatter suppression comments (#9899) 2024-02-28 19:21:06 +00:00
pragmas.rs Extend pragma comment cases (#7687) 2023-09-28 18:55:19 +00:00
textwrap.rs Skip empty lines when determining base indentation (#9795) 2024-02-02 19:42:47 +00:00
tokenizer.rs Remove cyclic dev dependency with the parser crate (#11261) 2024-05-07 09:24:57 +00:00
whitespace.rs Remove cyclic dev dependency with the parser crate (#11261) 2024-05-07 09:24:57 +00:00