MCPcopy Index your code
hub / github.com/python/cpython / id_for

Method id_for

Doc/tools/extensions/audit_events.py:71–74  ·  view source on GitHub ↗
(self, name)

Source from the content-addressed store, hash-verified

69 return
70
71 def id_for(self, name) -> str:
72 source_count = len(self.sources.get(name, set()))
73 name_clean = re.sub(r"\W", "_", name)
74 return f"audit_event_{name_clean}_{source_count}"
75
76 def rows(self) -> Iterator[tuple[str, list[str], Set[tuple[str, str]]]]:
77 for name in sorted(self.events.keys()):

Callers 1

runMethod · 0.80

Calls 3

setFunction · 0.85
getMethod · 0.45
subMethod · 0.45

Tested by

no test coverage detected