Skip to content

Conversation

@TimFelixBeyer
Copy link
Contributor

Pylint now recommends using yield from and the use of min/max to simplify if statements.

Pylint now recommends using `yield from` and the use of `min/max` to simplify if statements.
@coveralls
Copy link

coveralls commented Mar 3, 2024

Coverage Status

coverage: 93.032% (+0.001%) from 93.031%
when pulling c7c439b on TimFelixBeyer:lint-fix
into f2f7bad on cuthbertLab:master.

for group in olDict.values():
if len(group) > maxVoiceCount:
maxVoiceCount = len(group)
maxVoiceCount = max([len(group) for group in olDict.values()] + [1])
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

@jacobtylerwalls jacobtylerwalls left a 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!

@jacobtylerwalls jacobtylerwalls merged commit dbd8c9f into cuthbertLab:master Mar 4, 2024
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.

3 participants