forked from VimPlug/jedi
The string_name of a Name should always be unicode
This commit is contained in:
@@ -8,7 +8,6 @@ import re
|
|||||||
from parso.cache import parser_cache
|
from parso.cache import parser_cache
|
||||||
from parso.python.tree import search_ancestor
|
from parso.python.tree import search_ancestor
|
||||||
|
|
||||||
from jedi._compatibility import u
|
|
||||||
from jedi import settings
|
from jedi import settings
|
||||||
from jedi.evaluate.utils import ignored, unite
|
from jedi.evaluate.utils import ignored, unite
|
||||||
from jedi.cache import memoize_method
|
from jedi.cache import memoize_method
|
||||||
@@ -260,7 +259,7 @@ class BaseDefinition(object):
|
|||||||
@property
|
@property
|
||||||
def description(self):
|
def description(self):
|
||||||
"""A textual description of the object."""
|
"""A textual description of the object."""
|
||||||
return u(self._name.string_name)
|
return self._name.string_name
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def full_name(self):
|
def full_name(self):
|
||||||
@@ -526,7 +525,7 @@ class Definition(BaseDefinition):
|
|||||||
if typ == 'function':
|
if typ == 'function':
|
||||||
# For the description we want a short and a pythonic way.
|
# For the description we want a short and a pythonic way.
|
||||||
typ = 'def'
|
typ = 'def'
|
||||||
return typ + ' ' + u(self._name.string_name)
|
return typ + ' ' + self._name.string_name
|
||||||
elif typ == 'param':
|
elif typ == 'param':
|
||||||
code = search_ancestor(tree_name, 'param').get_code(
|
code = search_ancestor(tree_name, 'param').get_code(
|
||||||
include_prefix=False,
|
include_prefix=False,
|
||||||
|
|||||||
Reference in New Issue
Block a user