Fix code completion on lists and dicts#20
Merged
Tobias-Kohn merged 2 commits intoTobias-Kohn:masterfrom Feb 6, 2025
Merged
Conversation
…e of which previously failed). There were two issues: - LIST_TYPE had some list methods which as far as I can tell don't exist in Python: first, head, last, tail. I might be wrong but Python 3 doesn't seem to have them. - Autocompletion on lists was blank rather than showing available methods. I think this was because it was not wrapping ListType in an Instance (the default Instance apply doesn't wrap lists).
…previously failed). There were two issues: - DICT_TYPE had some dict methods which were removed in Python 3: iteritems (et al) and viewitems (et al). I think TigerPython now only targets Python 3, so they should be removed? - Autocompletion on dicts was blank rather than showing available methods. I don't want to go to the effort of adding full dict type support like there is for lists, but this at least gets it showing the methods on a dict which are available on all dicts (regardless of the type contained within).
Owner
|
Thanks for cleaning this up. Yes, I think it makes sense to exclusively target Python 3 now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
We discovered that code completion doesn't work on list and dict types, so here's a couple of commits to fix that. I'm not 100% sure about the first one (changing Instance to new Instance), so worth looking at. I also fixed some superfluous (in Python 3) items being shown on those types.