Skip to content

Conversation

@vil02
Copy link
Contributor

@vil02 vil02 commented Jul 20, 2025

A generator can be used here (cf. use-a-generator / R1729)

@vil02 vil02 marked this pull request as ready for review July 20, 2025 13:40
@vil02 vil02 changed the title Use generator Use a generator Jul 20, 2025
Copy link
Member

@ryanking13 ryanking13 left a comment

Choose a reason for hiding this comment

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

Thanks. Could you please update the PR title to be clearer?

Replaced list comprehension with a generator expression in the `any()` call to address the `use-a-generator / R1729` pylint warning.
This improves efficiency by avoiding creation of an intermediate list.
@vil02 vil02 changed the title Use a generator Resolve pylint R1729 by using generator in any() Jul 21, 2025
@vil02 vil02 requested a review from ryanking13 July 21, 2025 11:27
@ryanking13 ryanking13 merged commit b84e0d8 into pyodide:main Jul 21, 2025
14 checks passed
@vil02 vil02 deleted the use_generator branch July 21, 2025 11:49
@vil02 vil02 mentioned this pull request Jul 29, 2025
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