forked from VimPlug/jedi
A bit more solid typing for goto_or_help_or_infer
This commit is contained in:
+6
-4
@@ -133,11 +133,13 @@ def goto_or_help(request, Script):
|
|||||||
|
|
||||||
@pytest.fixture(scope='session', params=['goto', 'help', 'infer'])
|
@pytest.fixture(scope='session', params=['goto', 'help', 'infer'])
|
||||||
def goto_or_help_or_infer(request, Script):
|
def goto_or_help_or_infer(request, Script):
|
||||||
def do(code, *args, **kwargs):
|
class GotoOrHelpOrInfer:
|
||||||
return getattr(Script(code), request.param)(*args, **kwargs)
|
def __call__(self, code, *args, **kwargs):
|
||||||
|
return getattr(Script(code), request.param)(*args, **kwargs)
|
||||||
|
|
||||||
do.type = request.param # type: ignore[attr-defined]
|
type = request.param
|
||||||
return do
|
|
||||||
|
return GotoOrHelpOrInfer()
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope='session', params=['goto', 'complete', 'help'])
|
@pytest.fixture(scope='session', params=['goto', 'complete', 'help'])
|
||||||
|
|||||||
Reference in New Issue
Block a user