forked from VimPlug/jedi-vim
jedi v0.20.0 and parso v0.8.7 (#1145)
* jedi v0.20.0 and parso v0.8.7 * test: update signature expectations for typeshed v0.20.0 - update staticmethod and format signatures to match new typeshed - fix command line truncation test: disable autoindent instead of relying on \<BS> after `o`, which joins lines under default bs=eol rather than just removing the indent
This commit is contained in:
+1
-1
Submodule pythonx/jedi updated: 41e9e957e7...3102215478
+1
-1
Submodule pythonx/parso updated: 28005a5cf6...bfe3058441
@@ -41,7 +41,7 @@ describe 'signatures'
|
|||||||
doautocmd CursorHoldI
|
doautocmd CursorHoldI
|
||||||
noautocmd normal istaticmethod()
|
noautocmd normal istaticmethod()
|
||||||
doautocmd CursorHoldI
|
doautocmd CursorHoldI
|
||||||
Expect getline(1) == '?!?jedi=0, ?!? (*_*f: Callable[..., Any]*_*) ?!?jedi?!?'
|
Expect getline(1) == '?!?jedi=0, ?!? (*_*f: Callable[_P, _R_co]*_*) ?!?jedi?!?'
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'highlights correct argument'
|
it 'highlights correct argument'
|
||||||
@@ -51,11 +51,11 @@ describe 'signatures'
|
|||||||
" Move to x - highlights "x".
|
" Move to x - highlights "x".
|
||||||
noautocmd normal 2h
|
noautocmd normal 2h
|
||||||
doautocmd CursorHoldI
|
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").
|
" Move left to 42 - hightlights first argument ("value").
|
||||||
noautocmd normal 4h
|
noautocmd normal 4h
|
||||||
doautocmd CursorHoldI
|
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
|
end
|
||||||
|
|
||||||
it 'no signature'
|
it 'no signature'
|
||||||
@@ -82,7 +82,7 @@ describe 'signatures'
|
|||||||
redir => msg
|
redir => msg
|
||||||
python3 jedi_vim.show_call_signatures()
|
python3 jedi_vim.show_call_signatures()
|
||||||
redir END
|
redir END
|
||||||
Expect msg == "\nstaticmethod(f: Callable[..., Any])"
|
Expect msg == "\nstaticmethod(f: Callable[_P, _R_co])"
|
||||||
|
|
||||||
redir => msg
|
redir => msg
|
||||||
doautocmd InsertLeave
|
doautocmd InsertLeave
|
||||||
@@ -98,6 +98,11 @@ describe 'signatures'
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'command line truncation'
|
it 'command line truncation'
|
||||||
|
" Disable autoindent so `o` opens a new line at column 0; relying on
|
||||||
|
" `\<BS>` 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
|
let g:jedi#show_call_signatures = 2
|
||||||
call jedi#configure_call_signatures()
|
call jedi#configure_call_signatures()
|
||||||
|
|
||||||
@@ -111,7 +116,7 @@ describe 'signatures'
|
|||||||
let funcname = repeat('a', &columns - (30 + (&ruler ? 18 : 0)))
|
let funcname = repeat('a', &columns - (30 + (&ruler ? 18 : 0)))
|
||||||
put = 'def '.funcname.'(arg1, arg2, arg3, a, b, c):'
|
put = 'def '.funcname.'(arg1, arg2, arg3, a, b, c):'
|
||||||
put = ' pass'
|
put = ' pass'
|
||||||
execute "normal o\<BS>".funcname."( "
|
execute "normal o".funcname."( "
|
||||||
Expect Signature() == "\n".funcname."(arg1, …)"
|
Expect Signature() == "\n".funcname."(arg1, …)"
|
||||||
|
|
||||||
exe 'normal sarg1, '
|
exe 'normal sarg1, '
|
||||||
@@ -126,7 +131,7 @@ describe 'signatures'
|
|||||||
g/^/d
|
g/^/d
|
||||||
put = 'def '.funcname.'('.repeat('b', 20).', arg2):'
|
put = 'def '.funcname.'('.repeat('b', 20).', arg2):'
|
||||||
put = ' pass'
|
put = ' pass'
|
||||||
execute "normal o\<BS>".funcname."( "
|
execute "normal o".funcname."( "
|
||||||
Expect Signature() == "\n".funcname."(…)"
|
Expect Signature() == "\n".funcname."(…)"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user