ruff
4366473d - [`flake8-type-checking`] Fix some safe fixes being labeled unsafe (#15638)

Commit
242 days ago
[`flake8-type-checking`] Fix some safe fixes being labeled unsafe (#15638) ## Summary We were mistakenly using `CommentRanges::has_comments` to determine whether our edits were safe, which sometimes expands the checked range to the end of a line. But in order to determine safety we need to check exactly the range we're replacing. This bug affected the rules `runtime-cast-value` (`TC006`) and `quoted-type-alias` (`TC008`) although it was very unlikely to be hit for `TC006` and for `TC008` we never hit it because we were checking the wrong expression. ## Test Plan `cargo nextest run`
Author
Parents
Loading