precautionary fix without test (sith.py didn't reproduce it), in execution detection.

This commit is contained in:
Dave Halter
2014-04-30 12:20:59 +02:00
parent 44d8abb198
commit 5ed887c170

View File

@@ -14,7 +14,7 @@ check for -> a is a string). There's big potential in these checks.
import sys
from jedi._compatibility import hasattr, unicode, u, reraise
from jedi.parser import representation as pr
from jedi.parser import representation as pr, tokenize
from jedi import debug
from jedi import common
from jedi import settings
@@ -132,7 +132,7 @@ class NameFinder(object):
if name.parent.isinstance(pr.Statement):
def is_execution(calls):
for c in calls:
if isinstance(c, (unicode, str)):
if isinstance(c, (unicode, str, tokenize.Token)):
continue
if c.isinstance(pr.Array):
if is_execution(c):