Skip to content
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

Auto-quoting fails when multiple members of a union are quoted #9135

Closed
charliermarsh opened this issue Dec 14, 2023 · 0 comments · Fixed by #9140
Closed

Auto-quoting fails when multiple members of a union are quoted #9135

charliermarsh opened this issue Dec 14, 2023 · 0 comments · Fixed by #9140
Assignees
Labels
bug Something isn't working

Comments

@charliermarsh
Copy link
Member

Given:

from django.contrib.auth.models import AbstractBaseUser, AnonymousUser

def foo(
    self, user: AbstractBaseUser | AnonymousUser, view: 'type[CondorBaseViewSet]'
):
    pass

Running cargo run -p ruff_cli -- check foo.py --select TCH --fix -n --unsafe-fixes fails due to assertion failed: start.raw <= end.raw.

@charliermarsh charliermarsh added the bug Something isn't working label Dec 14, 2023
@charliermarsh charliermarsh self-assigned this Dec 14, 2023
charliermarsh added a commit that referenced this issue Dec 14, 2023
If you have multiple sub-expressions that need to be quoted, we'll
generate the same edit twice.

Closes #9135.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant