mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 22:44:27 +08:00
Make sure params have no name
This commit is contained in:
@@ -341,6 +341,9 @@ class _ParamMixin(object):
|
|||||||
return '**'
|
return '**'
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
|
def get_qualified_names(self, include_module_names=False):
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
class ParamNameInterface(_ParamMixin):
|
class ParamNameInterface(_ParamMixin):
|
||||||
api_type = u'param'
|
api_type = u'param'
|
||||||
|
|||||||
@@ -113,3 +113,9 @@ def test_os_path(Script):
|
|||||||
def test_os_issues(Script):
|
def test_os_issues(Script):
|
||||||
"""Issue #873"""
|
"""Issue #873"""
|
||||||
assert [c.name for c in Script('import os\nos.nt''').complete()] == ['nt']
|
assert [c.name for c in Script('import os\nos.nt''').complete()] == ['nt']
|
||||||
|
|
||||||
|
|
||||||
|
def test_param_name(Script):
|
||||||
|
name, = Script('class X:\n def foo(bar): bar''').goto()
|
||||||
|
assert name.type == 'param'
|
||||||
|
assert name.full_name is None
|
||||||
|
|||||||
Reference in New Issue
Block a user