You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm making tests about python typing's state of art, and I noticed few issues with TypedDict.
I will use -> for start completion and _ for next cursor position.
importtypingastclassTable(t.TypedDict):
a: intb: strdefcreate(v: Table) ->Table:
v["a"] +=1# v["->"] Suggestion and completion are correct v["a"] +=1# v["->"] Suggestion contains 2 times the row : « "a" string "a" »v["a"] +=1# v["->"] Suggestion contains 3 times the row : « "a" string "a" »# and so on, and it is the same for b, each assignment add a suggestionprint(v["a"]) # print(v["->"] Suggestion contains « "a?!?jedi=1, " »# it seems to be caused by a previous assignmentreturnvcreate() # create(->) Global suggestion ; should complete with `{_}` or `dict(_)` ?create({}) # create({->}) Global suggestion :# should suggest « "a" string "a" » or « "b" string "b" » ?# should complete with `"a": _` or `"b": ` ?# I guess TypedDict's total should not change anything unless we add the coma :# Total=True : should complete with `"a": _,` or `"b": "_",` ?# Total=False : should complete with `"a": _` or `"b": "_"` ?create({"a": 5,})
# create({"a": 5,->}) should complete with `b": "_"` (last attribute so without coma)
I'm using jedi through vim-jedi. And I don't think I'm able to fix the issues (at least in a descent amount of time).
The text was updated successfully, but these errors were encountered:
I'm pretty sure this is related to call signatures. You can either change the setting there to show it differently or turn it off. This sometimes bugs out, but it's definitely not a Jedi bug.
I'm using jedi through vim-jedi. And I don't think I'm able to fix the issues (at least in a descent amount of time).
Yes, these are not easy issues. Some of them however are doable, like the create(->) Global suggestion ; should complete with {}ordict() ?
It is the propositions for completions, and completions are results when accept proposition :
Indeed, :let g:jedi#show_call_signatures=2 solved the "a?!?jedi=1, " suggestion but I still have duplicated suggestions for "a" for each previous assignment.
Yes, these are not easy issues. Some of them however are doable, like the create(->) Global suggestion ; should complete with {}ordict() ?
I'm making tests about python typing's state of art, and I noticed few issues with
TypedDict
.I will use
->
for start completion and_
for next cursor position.I'm using jedi through vim-jedi. And I don't think I'm able to fix the issues (at least in a descent amount of time).
The text was updated successfully, but these errors were encountered: