mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 06:44:46 +08:00
Replace Param.get_description with get_code and a parameter include_coma.
This commit is contained in:
@@ -15,7 +15,7 @@ from jedi.evaluate import representation as er
|
||||
from jedi.evaluate import instance
|
||||
from jedi.evaluate import imports
|
||||
from jedi.evaluate import compiled
|
||||
from jedi.evaluate.filters import ParamName, TreeNameDefinition
|
||||
from jedi.evaluate.filters import ParamName
|
||||
from jedi.evaluate.imports import ImportName
|
||||
from jedi.api.keywords import KeywordName
|
||||
|
||||
@@ -538,7 +538,12 @@ class Definition(BaseDefinition):
|
||||
typ = 'def'
|
||||
return typ + ' ' + u(self._name.string_name)
|
||||
elif typ == 'param':
|
||||
return typ + ' ' + tree_name.get_definition().get_description()
|
||||
code = tree_name.get_definition().get_code(
|
||||
include_prefix=False,
|
||||
include_comma=False
|
||||
)
|
||||
return typ + ' ' + code
|
||||
|
||||
|
||||
definition = tree_name.get_definition()
|
||||
# Remove the prefix, because that's not what we want for get_code
|
||||
|
||||
Reference in New Issue
Block a user