diff --git a/pythonx/jedi b/pythonx/jedi index 41e9e95..3102215 160000 --- a/pythonx/jedi +++ b/pythonx/jedi @@ -1 +1 @@ -Subproject commit 41e9e957e7fce02e63a41af66c9c891e33411569 +Subproject commit 3102215478fe07b965dcd8221c17436d1dd7e8ac diff --git a/pythonx/parso b/pythonx/parso index 28005a5..bfe3058 160000 --- a/pythonx/parso +++ b/pythonx/parso @@ -1 +1 @@ -Subproject commit 28005a5cf68cdbd721c4ca11fc82f912b3e11aa3 +Subproject commit bfe30584415cde2e5a686512c2b109e1d06da3b6 diff --git a/test/vspec/signatures.vim b/test/vspec/signatures.vim index 8ac0ed9..00c303d 100644 --- a/test/vspec/signatures.vim +++ b/test/vspec/signatures.vim @@ -41,7 +41,7 @@ describe 'signatures' doautocmd CursorHoldI noautocmd normal istaticmethod() doautocmd CursorHoldI - Expect getline(1) == '?!?jedi=0, ?!? (*_*f: Callable[..., Any]*_*) ?!?jedi?!?' + Expect getline(1) == '?!?jedi=0, ?!? (*_*f: Callable[_P, _R_co]*_*) ?!?jedi?!?' end it 'highlights correct argument' @@ -51,11 +51,11 @@ describe 'signatures' " Move to x - highlights "x". noautocmd normal 2h doautocmd CursorHoldI - Expect getline(1) == '?!?jedi=0, ?!? (value: object, *_*format_spec: str=...*_*) ?!?jedi?!?' + Expect getline(1) == '?!?jedi=0, ?!? (value: object, *_*format_spec: str=""*_*) ?!?jedi?!?' " Move left to 42 - hightlights first argument ("value"). noautocmd normal 4h doautocmd CursorHoldI - Expect getline(1) == '?!?jedi=0, ?!? (*_*value: object*_*, format_spec: str=...) ?!?jedi?!?' + Expect getline(1) == '?!?jedi=0, ?!? (*_*value: object*_*, format_spec: str="") ?!?jedi?!?' end it 'no signature' @@ -82,7 +82,7 @@ describe 'signatures' redir => msg python3 jedi_vim.show_call_signatures() redir END - Expect msg == "\nstaticmethod(f: Callable[..., Any])" + Expect msg == "\nstaticmethod(f: Callable[_P, _R_co])" redir => msg doautocmd InsertLeave @@ -98,6 +98,11 @@ describe 'signatures' end it 'command line truncation' + " Disable autoindent so `o` opens a new line at column 0; relying on + " `\` to strip the indent is not portable across vim/nvim defaults + " (with `bs=eol` it joins lines instead of just removing the indent). + setlocal noautoindent nosmartindent indentexpr= + let g:jedi#show_call_signatures = 2 call jedi#configure_call_signatures() @@ -111,7 +116,7 @@ describe 'signatures' let funcname = repeat('a', &columns - (30 + (&ruler ? 18 : 0))) put = 'def '.funcname.'(arg1, arg2, arg3, a, b, c):' put = ' pass' - execute "normal o\".funcname."( " + execute "normal o".funcname."( " Expect Signature() == "\n".funcname."(arg1, …)" exe 'normal sarg1, ' @@ -126,7 +131,7 @@ describe 'signatures' g/^/d put = 'def '.funcname.'('.repeat('b', 20).', arg2):' put = ' pass' - execute "normal o\".funcname."( " + execute "normal o".funcname."( " Expect Signature() == "\n".funcname."(…)" end