mirror of
https://github.com/davidhalter/jedi.git
synced 2026-10-11 15:49:38 +08:00
Make sure to avoid duplicates in completions
This commit is contained in:
1 parent
94a97ff8e8
commit
ca13c44788
3 files changed
+27
-18
No files matched your search
+2
-2
@@ -55,12 +55,12 @@ def _completions_for_dicts(inference_state, dicts, literal_string, cut_end_quote
|
||||
dict_key_str = _create_repr_string(literal_string, dict_key)
|
||||
if dict_key_str.startswith(literal_string):
|
||||
n = dict_key_str[len(literal_string):-len(cut_end_quote) or None]
|
||||
name = StringName(inference_state, n)
|
||||
name = StringName(inference_state, dict_key_str[:-len(cut_end_quote) or None])
|
||||
yield Completion(
|
||||
inference_state,
|
||||
name,
|
||||
stack=None,
|
||||
like_name_length=0,
|
||||
like_name_length=len(literal_string),
|
||||
is_fuzzy=fuzzy
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user