Fix tree sitter commit #298
Open
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.
While attempting to test the scenarios mentioned in the description of #278, I came across what appear to be some bugs created in commit 4cd5c51. I'm not sure if these fixes are the best way to address them, though; all I know is they got my Sphinx build back up and running again.
Commits
fix: Handle the zero matches case (da08566)
When trying to test out the
masterbranch against my project, to see if we're ready for a 0.23.0 release, I ran into the following error:Digging further, the problem was actually:
I was able to rewind through history to find this problem first arose with commit 4cd5c51. The problem is occasionally
q_arg.matches(arg)will return no matches (an empty list), so we need to check for that possibility before attempting to access the first element of the list.fix: Don't link to base classes for non-classes (0a81e9b)
After applying the fix in the prior commit, the next error I ran into was:
It appeared we were trying to add links to base classes for all object types (functions, in the error above), not just classes.
Notes to Reviewers
My process was:
masterand ensure my Sphinx build was still working.tox -e "3.8-sphinx45"to ensure the tests were still passing.If these fixes should be implemented in a different way, please feel free to push commits to this branch.