Remove get_matching_functions, it was unused code

This commit is contained in:
Dave Halter
2019-05-19 16:06:22 +02:00
parent 4b2518ca9a
commit 7ec76bc0b5
2 changed files with 0 additions and 21 deletions

View File

@@ -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]

View File

@@ -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()]