forked from VimPlug/jedi
fixed an index problem with the parser, which could happen with really special code
This commit is contained in:
@@ -1391,7 +1391,7 @@ class PyFuzzyParser(object):
|
|||||||
# main scope, so just take the last statement.
|
# main scope, so just take the last statement.
|
||||||
try:
|
try:
|
||||||
s = self.scope.statements[-1].set_next(f)
|
s = self.scope.statements[-1].set_next(f)
|
||||||
except AttributeError:
|
except (AttributeError, IndexError):
|
||||||
# If set_next doesn't exist, just add it.
|
# If set_next doesn't exist, just add it.
|
||||||
s = self.scope.add_statement(f)
|
s = self.scope.add_statement(f)
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -43,3 +43,10 @@ except AttributeError
|
|||||||
finally:
|
finally:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
#? ['isinstance']
|
||||||
|
if isi
|
||||||
|
try:
|
||||||
|
except TypeError:
|
||||||
|
#? str()
|
||||||
|
""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user