Skip to content

Commit

Permalink
Fix a small signature issue
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhalter committed Jan 25, 2020
1 parent 2e036bf commit 7645762
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions jedi/inference/signature.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,20 +118,27 @@ def matches_signature(self, arguments):


class BuiltinSignature(AbstractSignature):
def __init__(self, value, return_string, is_bound=False):
def __init__(self, value, return_string, function_value=None, is_bound=False):
super(BuiltinSignature, self).__init__(value, is_bound)
self._return_string = return_string
self.__function_value = function_value

@property
def annotation_string(self):
return self._return_string

@property
def _function_value(self):
return self.value
if self.__function_value is None:
return self.value
return self.__function_value

def bind(self, value):
return BuiltinSignature(value, self._return_string, is_bound=True)
return BuiltinSignature(
value, self._return_string,
function_value=self.value,
is_bound=True
)


class SignatureWrapper(_SignatureMixin):
Expand Down

0 comments on commit 7645762

Please sign in to comment.