forked from VimPlug/jedi
Whitespace before brackets should still show call signatures.
This commit is contained in:
@@ -160,7 +160,8 @@ class UserContext(object):
|
|||||||
# def/class/import stops the process.
|
# def/class/import stops the process.
|
||||||
if next_must_be_name:
|
if next_must_be_name:
|
||||||
if tok_type == tokenize.NAME:
|
if tok_type == tokenize.NAME:
|
||||||
call, _ = self._calc_path_until_cursor(start_pos=pos)
|
end_pos = start_pos[0], start_pos[1] + len(tok_str)
|
||||||
|
call, _ = self._calc_path_until_cursor(start_pos=end_pos)
|
||||||
return call, index, key_name
|
return call, index, key_name
|
||||||
index = 0
|
index = 0
|
||||||
next_must_be_name = False
|
next_must_be_name = False
|
||||||
@@ -174,7 +175,6 @@ class UserContext(object):
|
|||||||
if level == 1:
|
if level == 1:
|
||||||
next_must_be_name = True
|
next_must_be_name = True
|
||||||
level = 0
|
level = 0
|
||||||
pos = start_pos
|
|
||||||
elif tok_str == ')':
|
elif tok_str == ')':
|
||||||
level -= 1
|
level -= 1
|
||||||
elif tok_str == ',':
|
elif tok_str == ',':
|
||||||
|
|||||||
@@ -174,6 +174,9 @@ class TestCallSignatures(TestCase):
|
|||||||
def test_unterminated_strings(self):
|
def test_unterminated_strings(self):
|
||||||
self._run('str(";', 'str', 0)
|
self._run('str(";', 'str', 0)
|
||||||
|
|
||||||
|
def test_whitespace_before_bracket(self):
|
||||||
|
self._run('str (";', 'str', 0)
|
||||||
|
|
||||||
|
|
||||||
class TestParams(TestCase):
|
class TestParams(TestCase):
|
||||||
def params(self, source, line=None, column=None):
|
def params(self, source, line=None, column=None):
|
||||||
|
|||||||
Reference in New Issue
Block a user