mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-01 03:15:23 +08:00
Call signatures should not fail when used on if(.
This commit is contained in:
@@ -505,6 +505,8 @@ class Script(object):
|
||||
return []
|
||||
|
||||
stmt = self._get_under_cursor_stmt(call_txt)
|
||||
if stmt is None:
|
||||
return []
|
||||
|
||||
with common.scale_speed_settings(settings.scale_call_signatures):
|
||||
origins = cache.cache_call_signatures(self._evaluator, stmt, self.source,
|
||||
|
||||
@@ -192,6 +192,9 @@ class TestCallSignatures(TestCase):
|
||||
"""
|
||||
assert not Script('str(\ndef x').call_signatures()
|
||||
|
||||
def test_flow_call(self):
|
||||
assert not Script('if (1').call_signatures()
|
||||
|
||||
|
||||
class TestParams(TestCase):
|
||||
def params(self, source, line=None, column=None):
|
||||
|
||||
Reference in New Issue
Block a user