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:
Daniel Hahler
2018-07-16 00:38:56 +02:00
committed by Dave Halter
parent c6716c6392
commit 9a4a4f4074

View File

@@ -475,6 +475,7 @@ def show_call_signatures(signatures=()):
if int(vim_eval("g:jedi#show_call_signatures")) == 2:
return cmdline_call_signatures(signatures)
seen_sigs = []
for i, signature in enumerate(signatures):
line, column = signature.bracket_start
# signatures are listed above each other
@@ -497,6 +498,11 @@ def show_call_signatures(signatures=()):
except (IndexError, TypeError):
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 is a stupid solution. But there is really no other yet.
# There is no possibility in VIM to draw on the screen, but there