Skip to content

Validate token ranges in the parser tests #11938

@dhruvmanila

Description

@dhruvmanila

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    parserRelated to the parsertestingRelated to testing Ruff itself

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions