forked from VimPlug/jedi-vim
Skip duplicate call signatures
I am seeing `p` twice for os.path.dirname, which seems to come from
Lib/posixpath.py and Lib/ntpath.py, as can be seen with `os.path.join`,
where I still see two with this patch:
```
(path, *paths)
import os (a, *p)
os.path.join()
```
This commit is contained in:
committed by
Dave Halter
parent
c6716c6392
commit
9a4a4f4074
@@ -475,6 +475,7 @@ def show_call_signatures(signatures=()):
|
|||||||
if int(vim_eval("g:jedi#show_call_signatures")) == 2:
|
if int(vim_eval("g:jedi#show_call_signatures")) == 2:
|
||||||
return cmdline_call_signatures(signatures)
|
return cmdline_call_signatures(signatures)
|
||||||
|
|
||||||
|
seen_sigs = []
|
||||||
for i, signature in enumerate(signatures):
|
for i, signature in enumerate(signatures):
|
||||||
line, column = signature.bracket_start
|
line, column = signature.bracket_start
|
||||||
# signatures are listed above each other
|
# signatures are listed above each other
|
||||||
@@ -497,6 +498,11 @@ def show_call_signatures(signatures=()):
|
|||||||
except (IndexError, TypeError):
|
except (IndexError, TypeError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
# Skip duplicates.
|
||||||
|
if params in seen_sigs:
|
||||||
|
continue
|
||||||
|
seen_sigs.append(params)
|
||||||
|
|
||||||
# This stuff is reaaaaally a hack! I cannot stress enough, that
|
# This stuff is reaaaaally a hack! I cannot stress enough, that
|
||||||
# this is a stupid solution. But there is really no other yet.
|
# this is a stupid solution. But there is really no other yet.
|
||||||
# There is no possibility in VIM to draw on the screen, but there
|
# There is no possibility in VIM to draw on the screen, but there
|
||||||
|
|||||||
Reference in New Issue
Block a user