-
Notifications
You must be signed in to change notification settings - Fork 402
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
Fix pylint recommendations #1694
Conversation
Pylint now recommends using `yield from` and the use of `min/max` to simplify if statements.
for group in olDict.values(): | ||
if len(group) > maxVoiceCount: | ||
maxVoiceCount = len(group) | ||
maxVoiceCount = max([len(group) for group in olDict.values()] + [1]) |
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.
This isn't necessarily better than the prior version, so although it's not worth reverting, it might have been worth adding a disable. To keep in mind for future lint additions.
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.
I agree, I'm pretty sure there should be a simpler option (maybe max([..], default=1)
, which would be ok if we know at least one group is not empty), but I wasn't able to confirm it quickly.
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.
Great, appreciate your help keeping the pipeline green!
Pylint now recommends using
yield from
and the use ofmin/max
to simplify if statements.