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

Validate token ranges in the parser tests #11938

Closed
dhruvmanila opened this issue Jun 19, 2024 · 0 comments · Fixed by #12019
Closed

Validate token ranges in the parser tests #11938

dhruvmanila opened this issue Jun 19, 2024 · 0 comments · Fixed by #12019
Labels
parser Related to the parser testing Related to testing Ruff itself

Comments

@dhruvmanila
Copy link
Member

dhruvmanila commented Jun 19, 2024

Issues such as #11937, #11929 basically suggests that the token ranges are overlapping which is causing the panic in downstream tools.

I think it would be useful to validate the parsed output in the test cases to make sure that the token ranges don't overlap. This would be similar to the validation done on the AST.

@dhruvmanila dhruvmanila added parser Related to the parser testing Related to testing Ruff itself labels Jun 19, 2024
@dhruvmanila dhruvmanila linked a pull request Jun 25, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parser Related to the parser testing Related to testing Ruff itself
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant