forked from VimPlug/jedi
Treat case like f()
This commit is contained in:
@@ -232,7 +232,7 @@ class Script(object):
|
||||
|
||||
context = self._module.get_context()
|
||||
scopes = set()
|
||||
lower_priority_operators = ('(', ',')
|
||||
lower_priority_operators = ('()', '(', ',')
|
||||
"""Operators that could hide callee."""
|
||||
if next(context) in ('class', 'def'):
|
||||
scopes = set([self._module.parser.user_scope])
|
||||
|
||||
@@ -122,6 +122,10 @@ class TestRegression(TestBase):
|
||||
defs = self.definition_when_in_function_call('f(1, ')
|
||||
self.assertEqual(defs[0].description, 'def f')
|
||||
|
||||
def test_definition_when_in_function_call_empty_paren(self):
|
||||
defs = self.definition_when_in_function_call('f(', ')')
|
||||
self.assertEqual(defs[0].description, 'def f')
|
||||
|
||||
def test_function_call_signature(self):
|
||||
defs = self.definition("""
|
||||
def f(x, y=1, z='a'):
|
||||
|
||||
Reference in New Issue
Block a user