ruff
c944d230 - Avoid nested quotations in auto-quoting fix (#9168)

Commit
1 year ago
Avoid nested quotations in auto-quoting fix (#9168) ## Summary Given `Callable[[Callable[_P, _R]], Callable[_P, _R]]` from the originating issue, when quoting `Callable`, we quoted the inner `[Callable[_P, _R]]`, and then created a separate edit for the outer `Callable`. Since there's an extra level of nesting in the subscript, the edit for `[Callable[_P, _R]]` correctly did _not_ expand to the entire expression. However, in this case, we should discard the inner edit, since the expression is getting quoted by the outer edit anyway. Closes https://github.com/astral-sh/ruff/issues/9162.
Author
Parents
Loading