Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add better detection of list/set comprehensions #300

Merged
merged 1 commit into from
Oct 21, 2023
Merged

Conversation

dosisod
Copy link
Owner

@dosisod dosisod commented Oct 21, 2023

See #298 (comment)

This PR adds better detection of list/set comprehensions. Previously Refurb checks ran depth first, meaning that the leaf nodes where the first nodes to be hit. Now the checks are ran before traversing, meaning checks will run on the root nodes first. This allows checks more flexibility, though for this PR, it allows them to ignore nodes that they have already seen which prevents multiple errors being emitted in certain circumstances.

Also bump version for new release.

See #298 (comment)

This PR adds better detection of list/set comprehensions. Previously Refurb
checks ran depth first, meaning that the leaf nodes where the first nodes to
be hit. Now the checks are ran before traversing, meaning checks will run on
the root nodes first. This allows checks more flexibility, though for this
PR, it allows them to ignore nodes that they have already seen which prevents
multiple errors being emitted in certain circumstances.

Also bump version for new release.
@dosisod dosisod merged commit 229e7ea into master Oct 21, 2023
3 checks passed
@dosisod dosisod deleted the breadth-first branch October 21, 2023 03:13
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.

1 participant