-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Linter panic] #9162
Comments
Thanks for filing. Unfortunately there isn't much we can do without an example file or code snippet that triggers the issue (minimal or not -- anything would be fine). As-is, it's a very generic trace, so it's kind of like saying "There's a bug somewhere in Ruff". Any chance you can provide more info? Otherwise, I'll have to close :/ |
Hi @charliermarsh , I've gone ahead and done this (even though it's late!). Please see https://github.com/dycw/ruff-0.1.8-bug/tree/0.1.0 , or, for posterity:
|
Awesome, thanks! With a repro we can definitely fix. Much appreciated. |
## 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 #9162.
Command
ruff --unsafe-fixes --fix .
Stack trace
pyproject.toml
Version
P.S. Sorry it's currently not feasible for me to out a minimal example..
The text was updated successfully, but these errors were encountered: