1
0
forked from VimPlug/jedi

Use __str__ instead of to_string

This commit is contained in:
Dave Halter
2019-07-31 00:00:37 +02:00
parent 75f654b944
commit 1151700114
5 changed files with 17 additions and 15 deletions
+2 -2
View File
@@ -309,7 +309,7 @@ class SignatureParamName(ParamNameInterface, AbstractNameDefinition):
def string_name(self):
return self._signature_param.name
def to_string(self):
def __str__(self):
s = self._kind_string() + self.string_name
if self._signature_param.has_annotation:
s += ': ' + self._signature_param.annotation_string
@@ -341,7 +341,7 @@ class UnresolvableParamName(ParamNameInterface, AbstractNameDefinition):
def get_kind(self):
return Parameter.POSITIONAL_ONLY
def to_string(self):
def __str__(self):
string = self.string_name
if self._default:
string += '=' + self._default