(cls: str, callee: str)
| 6729 | slot.append(tgt) |
| 6730 | |
| 6731 | def _method_of(cls: str, callee: str) -> "str | None": |
| 6732 | # The key folds case and drops `_`, so `run()` and `_run()` of one class |
| 6733 | # share it; Python names are exact. Among several, the one named exactly |
| 6734 | # `callee` is the call's target, and none or two of them is no edge, as |
| 6735 | # in the module arm below (#4577). |
| 6736 | hits = method_index.get((cls, _key(callee)), []) |
| 6737 | if len(hits) > 1: |
| 6738 | hits = [ |
| 6739 | m for m in hits |
| 6740 | if str(node_by_id.get(m, {}).get("label", "")).strip().lstrip(".").removesuffix("()") == callee |
| 6741 | ] |
| 6742 | return hits[0] if len(hits) == 1 else None |
| 6743 | |
| 6744 | # A class with N methods produced N entries; collapse to a unique set. (No |
| 6745 | # early return when there are no classes: the module arm below resolves |
no test coverage detected