Skip to content

Conversation

@charliermarsh
Copy link
Collaborator

Given the following:

" ".join(
    sql
    for sql in (
        "LIMIT %d" % limit if limit else None,
        ("OFFSET %d" % offset) if offset else None,
    )
)

The GeneratorExp was using the range of the sql token on the second line, as opposed to the entire range of the actual generator.

)"#;
let parse_ast = parse_expression(source, "<test>").unwrap();
insta::assert_debug_snapshot!(parse_ast);
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, I was lazy 🤦

@youknowone youknowone merged commit 61b48f1 into RustPython:main Feb 10, 2023
@charliermarsh charliermarsh deleted the charlie/gen-exp-arg branch February 10, 2023 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants