Skip to content

refactor: remove unnecessary comprehension#28

Open
deepsource-dev-autofix[bot] wants to merge 1 commit intomasterfrom
deepsource-autofix-e6acd78f
Open

refactor: remove unnecessary comprehension#28
deepsource-dev-autofix[bot] wants to merge 1 commit intomasterfrom
deepsource-autofix-e6acd78f

Conversation

@deepsource-dev-autofix
Copy link

This PR refactors calls to all() by replacing unnecessary list comprehensions with generator expressions for better performance and readability.

  • Unnecessary comprehension: The code originally used all([isinstance(i, int) for i in min_max]) which created an intermediate list on each call. All three instances have been updated to all(isinstance(i, int) for i in min_max), leveraging a generator expression to avoid needless list allocation.

This Autofix was generated by AI. Please review the change before merging.

This PR refactors calls to all() by replacing unnecessary list comprehensions with generator expressions for better performance and readability.

- Unnecessary comprehension: The code originally used all([isinstance(i, int) for i in min_max]) which created an intermediate list on each call. All three instances have been updated to all(isinstance(i, int) for i in min_max), leveraging a generator expression to avoid needless list allocation.

> This Autofix was generated by AI. Please review the change before merging.
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.

0 participants

Comments