mirror of
https://github.com/davidhalter/jedi.git
synced 2026-01-30 15:55:23 +08:00
Correct the two last unicode issues
This commit is contained in:
@@ -303,7 +303,7 @@ class SequenceLiteralContext(ArrayMixin, AbstractIterable):
|
||||
for key, value in self._items():
|
||||
for k in self._defining_context.eval_node(key):
|
||||
if isinstance(k, compiled.CompiledObject) \
|
||||
and k.execute_operation(compiled_obj_index, '==').get_safe_value():
|
||||
and k.execute_operation(compiled_obj_index, u'==').get_safe_value():
|
||||
return self._defining_context.eval_node(value)
|
||||
raise KeyError('No key found in dictionary %s.' % self)
|
||||
|
||||
|
||||
@@ -477,7 +477,7 @@ def tree_name_to_contexts(evaluator, context, tree_name):
|
||||
types = _remove_statements(evaluator, context, node, tree_name)
|
||||
elif typ == 'with_stmt':
|
||||
context_managers = context.eval_node(node.get_test_node_from_name(tree_name))
|
||||
enter_methods = context_managers.py__getattribute__('__enter__')
|
||||
enter_methods = context_managers.py__getattribute__(u'__enter__')
|
||||
return enter_methods.execute_evaluated()
|
||||
elif typ in ('import_from', 'import_name'):
|
||||
types = imports.infer_import(context, tree_name)
|
||||
|
||||
Reference in New Issue
Block a user