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

Method add_event

Doc/tools/extensions/audit_events.py:43–50  ·  view source on GitHub ↗
(
        self, name, args: list[str], source: tuple[str, str]
    )

Source from the content-addressed store, hash-verified

41 yield name, args, source
42
43 def add_event(
44 self, name, args: list[str], source: tuple[str, str]
45 ) -> None:
46 if name in self.events:
47 self._check_args_match(name, args)
48 else:
49 self.events[name] = args
50 self.sources.setdefault(name, set()).add(source)
51
52 def _check_args_match(self, name: str, args: list[str]) -> None:
53 current_args = self.events[name]

Callers 3

audit_events_purgeFunction · 0.95
audit_events_mergeFunction · 0.45
runMethod · 0.45

Calls 4

_check_args_matchMethod · 0.95
setFunction · 0.85
addMethod · 0.45
setdefaultMethod · 0.45

Tested by

no test coverage detected