forked from VimPlug/jedi
Fix potential issues with py2 analysis
This commit is contained in:
@@ -1,8 +1,10 @@
|
|||||||
"""
|
"""
|
||||||
Module for statical analysis.
|
Module for statical analysis.
|
||||||
"""
|
"""
|
||||||
from jedi import debug
|
|
||||||
from parso.python import tree
|
from parso.python import tree
|
||||||
|
|
||||||
|
from jedi._compatibility import force_unicode
|
||||||
|
from jedi import debug
|
||||||
from jedi.evaluate.compiled import CompiledObject
|
from jedi.evaluate.compiled import CompiledObject
|
||||||
from jedi.evaluate.helpers import is_string
|
from jedi.evaluate.helpers import is_string
|
||||||
|
|
||||||
@@ -192,7 +194,7 @@ def _check_for_exception_catch(node_context, jedi_name, exception, payload=None)
|
|||||||
key, lazy_context = args[1]
|
key, lazy_context = args[1]
|
||||||
names = list(lazy_context.infer())
|
names = list(lazy_context.infer())
|
||||||
assert len(names) == 1 and is_string(names[0])
|
assert len(names) == 1 and is_string(names[0])
|
||||||
assert names[0].get_safe_value() == payload[1].value
|
assert force_unicode(names[0].get_safe_value()) == payload[1].value
|
||||||
|
|
||||||
# Check objects
|
# Check objects
|
||||||
key, lazy_context = args[0]
|
key, lazy_context = args[0]
|
||||||
|
|||||||
Reference in New Issue
Block a user