MCPcopy Index your code
hub / github.com/python/mypy / suggest_callsites

Method suggest_callsites

mypy/suggestions.py:287–300  ·  view source on GitHub ↗

Find a list of call sites of function.

(self, function: str)

Source from the content-addressed store, hash-verified

285 return self.format_signature(suggestion)
286
287 def suggest_callsites(self, function: str) -> str:
288 """Find a list of call sites of function."""
289 mod, _, node = self.find_node(function)
290 with self.restore_after(mod):
291 callsites, _ = self.get_callsites(node)
292
293 return "\n".join(
294 dedup(
295 [
296 f"{path}:{line}: {self.format_args(arg_kinds, arg_names, arg_types)}"
297 for path, line, arg_kinds, _, arg_names, arg_types in callsites
298 ]
299 )
300 )
301
302 @contextmanager
303 def restore_after(self, module: str) -> Iterator[None]:

Callers 1

cmd_suggestMethod · 0.95

Calls 6

find_nodeMethod · 0.95
restore_afterMethod · 0.95
get_callsitesMethod · 0.95
format_argsMethod · 0.95
dedupFunction · 0.85
joinMethod · 0.45

Tested by

no test coverage detected