Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Like with previous PR aiming to increase our test coverage (#1058), doing so this time revealed a few places where code was unused, or could be rewritten to be better optimized, removed, or made easier to read.
One find that is yet to be addressed here is how we copy the whole
ast.found.refs
object intoast.all_refs
, which surely comes with a cost that seems unnecessary, given we can useast.found.refs
directly instead. But since there are a few consumers, and they are not exactly identical (all_refs
contains import refs too), I'll follow up on that in a later PR.I'm also adding the codecov badge to the README to make it easy to see when our coverage drops. But I'm not as convinced we should fail PRs when coverage isn't 100% as I was before, as it might make for a worse contributor experience.
Fixes #918