-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 additional arguments for sum and max comprehensions #12364
Conversation
call.args[0].comma = Some(Comma { | ||
whitespace_after: ParenthesizableWhitespace::default(), | ||
..comma.clone() | ||
}); |
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.
Without this, we were (1) dropping commas in some tests (see fixture changes), and (2) adding an extra space after the comma when fixing sum([x.val for x in bar], 0)
(not sure why?).
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.
Hmm, I don't remember why this was None but this seems correct to me. It might've been some weird comment placement, not sure though.
|
code | total | + violation | - violation | + fix | - fix |
---|---|---|---|---|---|
C419 | 6 | 6 | 0 | 0 | 0 |
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.
Good find!
Summary
These can have other arguments, so it seems wrong to gate on single argument here.
Closes #12358.