Call signatures should not fail when used on if(.

This commit is contained in:
Dave Halter
2015-02-27 12:17:44 +01:00
parent 53490991d7
commit ea8209d45e
2 changed files with 5 additions and 0 deletions

View File

@@ -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,

View File

@@ -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):