Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix set comprehensions being suggested to be removed for list/tuple constructions #131

Merged
merged 1 commit into from
Nov 23, 2022

Conversation

dosisod
Copy link
Owner

@dosisod dosisod commented Nov 23, 2022

Because sets cannot contain unique elements, you can use a set comprehension to eliminate any duplicates, and then convert the result to a list or tuple. This would change though if you dropped the set comprehension, because the length of the resulting list would contain more elements, and would not be unique.

…onstruction:

Because sets cannot contain unique elements, you can use a set comprehension to
eliminate any duplicates, and then convert the result to a list or tuple. This
would change though if you dropped the set comprehension, because the length of
the resulting list would contain more elements, and would not be unique.
@dosisod dosisod merged commit 404a0a1 into master Nov 23, 2022
@dosisod dosisod deleted the furb137-false-positive branch November 23, 2022 20:04
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant