Skip to content

refactor(hook): use set literal instead of list comprehension - #24

Closed
melintobias wants to merge 1 commit into
Eliav2:masterfrom
melintobias:master
Closed

melintobias wants to merge 1 commit into
Eliav2:masterfrom
melintobias:master

Conversation

@melintobias

Copy link
Copy Markdown

Set literals are both faster and more idiomatic. Tests pass and it's compatible with >=3.6.

Unsure if Conventional Commits message style was OK, but I didn't see any information on the matter.

@Squiblydoo

Copy link
Copy Markdown
Collaborator

Thanks for the PR. From my poking at this, I can't tell that it makes a meaningful change. Did you notice a meaningful impact? Or what brought you to recommend the change?

@melintobias

melintobias commented Oct 7, 2026 •

Copy link
Copy Markdown
Author

Makes the code simpler, which (especially since it's intended for distribution) lowers the probability of failure when the code is expanded upon. Set literals are also around three times faster than using set to convert list comprehensions.

EDIT:
Note that it's negligible, of course.

@Squiblydoo Squiblydoo closed this Oct 25, 2026
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