forked from VimPlug/jedi
Make sure you can search for 'def something'
This commit is contained in:
@@ -466,4 +466,6 @@ def validate_line_column(func):
|
|||||||
|
|
||||||
def split_search_string(name):
|
def split_search_string(name):
|
||||||
type, _, dotted_names = name.rpartition(' ')
|
type, _, dotted_names = name.rpartition(' ')
|
||||||
|
if type == 'def':
|
||||||
|
type = 'function'
|
||||||
return type, dotted_names.split('.')
|
return type, dotted_names.split('.')
|
||||||
|
|||||||
@@ -61,6 +61,10 @@ def test_load_save_project(tmpdir):
|
|||||||
('sample_int', ['helpers.sample_int'], {}),
|
('sample_int', ['helpers.sample_int'], {}),
|
||||||
('sample_int', ['helpers.sample_int'], dict(all_scopes=True)),
|
('sample_int', ['helpers.sample_int'], dict(all_scopes=True)),
|
||||||
('sample_int.real', ['builtins.int.real'], {}),
|
('sample_int.real', ['builtins.int.real'], {}),
|
||||||
|
|
||||||
|
('class sample_int.real', [], {}),
|
||||||
|
('function sample_int.real', ['builtins.int.real'], {}),
|
||||||
|
('def sample_int.real', ['builtins.int.real'], {}),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@pytest.mark.skipif(sys.version_info < (3, 6), reason="Ignore Python 2, because EOL")
|
@pytest.mark.skipif(sys.version_info < (3, 6), reason="Ignore Python 2, because EOL")
|
||||||
|
|||||||
Reference in New Issue
Block a user