Find all call sites of a function.
(self, func: FuncDef)
| 421 | return [refine_callable(base, base.copy_modified(arg_types=list(x))) for x in product] |
| 422 | |
| 423 | def get_callsites(self, func: FuncDef) -> tuple[list[Callsite], list[str]]: |
| 424 | """Find all call sites of a function.""" |
| 425 | new_type = self.get_starting_type(func) |
| 426 | |
| 427 | collector_plugin = SuggestionPlugin(func.fullname) |
| 428 | |
| 429 | self.plugin._plugins.insert(0, collector_plugin) |
| 430 | try: |
| 431 | errors = self.try_type(func, new_type) |
| 432 | finally: |
| 433 | self.plugin._plugins.pop(0) |
| 434 | |
| 435 | return collector_plugin.mystery_hits, errors |
| 436 | |
| 437 | def filter_options( |
| 438 | self, guesses: list[CallableType], is_method: bool, ignore_return: bool |
no test coverage detected