mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 14:04:26 +08:00
A python 2 fix
This commit is contained in:
@@ -29,7 +29,7 @@ class _ModuleAttributeName(AbstractNameDefinition):
|
|||||||
s = self._string_value
|
s = self._string_value
|
||||||
if self.parent_context.evaluator.environment.version_info.major == 2 \
|
if self.parent_context.evaluator.environment.version_info.major == 2 \
|
||||||
and not isinstance(s, bytes):
|
and not isinstance(s, bytes):
|
||||||
s = bytes(s, 'utf-8')
|
s = s.encode('utf-8')
|
||||||
return ContextSet([
|
return ContextSet([
|
||||||
create_simple_object(self.parent_context.evaluator, s)
|
create_simple_object(self.parent_context.evaluator, s)
|
||||||
])
|
])
|
||||||
|
|||||||
Reference in New Issue
Block a user