mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 06:44:46 +08:00
Remove get_matching_functions, it was unused code
This commit is contained in:
@@ -146,9 +146,6 @@ class FunctionContext(use_metaclass(CachedMetaClass, FunctionMixin, TreeContext)
|
||||
def get_default_param_context(self):
|
||||
return self.parent_context
|
||||
|
||||
def get_matching_functions(self, arguments):
|
||||
yield self
|
||||
|
||||
def get_signatures(self):
|
||||
return [TreeSignature(self)]
|
||||
|
||||
@@ -395,17 +392,6 @@ class OverloadedFunctionContext(FunctionMixin, ContextWrapper):
|
||||
return NO_CONTEXTS
|
||||
return ContextSet.from_sets(fe.infer() for fe in function_executions)
|
||||
|
||||
def get_matching_functions(self, arguments):
|
||||
for f in self.overloaded_functions:
|
||||
signature = parser_utils.get_call_signature(f.tree_node)
|
||||
if signature_matches(f, arguments):
|
||||
debug.dbg("Overloading match: %s@%s",
|
||||
signature, f.tree_node.start_pos[0], color='BLUE')
|
||||
yield f
|
||||
else:
|
||||
debug.dbg("Overloading no match: %s@%s (%s)",
|
||||
signature, f.tree_node.start_pos[0], arguments, color='BLUE')
|
||||
|
||||
def get_signatures(self):
|
||||
return [TreeSignature(f) for f in self.overloaded_functions]
|
||||
|
||||
|
||||
@@ -399,13 +399,6 @@ class BoundMethod(FunctionMixin, ContextWrapper):
|
||||
function_execution = self.get_function_execution(arguments)
|
||||
return function_execution.infer()
|
||||
|
||||
def get_matching_functions(self, arguments):
|
||||
for func in self._wrapped_context.get_matching_functions(arguments):
|
||||
if func is self:
|
||||
yield self
|
||||
else:
|
||||
yield BoundMethod(self.instance, func)
|
||||
|
||||
def get_signatures(self):
|
||||
return [sig.bind(self) for sig in self._wrapped_context.get_signatures()]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user