(stats: Stats)
| 1363 | |
| 1364 | def rare_event_section() -> Section: |
| 1365 | def calc_rare_event_table(stats: Stats) -> Table: |
| 1366 | DOCS = { |
| 1367 | "set class": "Setting an object's class, `obj.__class__ = ...`", |
| 1368 | "set bases": "Setting the bases of a class, `cls.__bases__ = ...`", |
| 1369 | "set eval frame func": ( |
| 1370 | "Setting the PEP 523 frame eval function " |
| 1371 | "`_PyInterpreterState_SetFrameEvalFunc()`" |
| 1372 | ), |
| 1373 | "builtin dict": "Modifying the builtins, `__builtins__.__dict__[var] = ...`", |
| 1374 | "func modification": "Modifying a function, e.g. `func.__defaults__ = ...`, etc.", |
| 1375 | "watched dict modification": "A watched dict has been modified", |
| 1376 | "watched globals modification": "A watched `globals()` dict has been modified", |
| 1377 | } |
| 1378 | return [(Doc(x, DOCS[x]), Count(y)) for x, y in stats.get_rare_events()] |
| 1379 | |
| 1380 | return Section( |
| 1381 | "Rare events", |
nothing calls this directly
no test coverage detected
searching dependent graphs…