-
Notifications
You must be signed in to change notification settings - Fork 790
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
Allow empty extras in pep508-rs
and add more corner case to tests
#2128
Allow empty extras in pep508-rs
and add more corner case to tests
#2128
Conversation
pep508-rs
and add more corner case to tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A small grammar nit regarding the error message:
Co-authored-by: Alex Waygood <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
5e0151f
to
646cdbd
Compare
@@ -617,9 +617,48 @@ fn parse_extras(cursor: &mut Cursor) -> Result<Vec<ExtraName>, Pep508Error> { | |||
let Some(bracket_pos) = cursor.eat_char('[') else { | |||
return Ok(vec![]); | |||
}; | |||
cursor.eat_whitespace(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved this out from the start of the loop, because it's also at the end of the loop.
Summary
Fixes #2127, allow empty extras, and add more corner case to tests
References