16 lines
315 B
Python
16 lines
315 B
Python
from typing import Any, Callable
|
|
|
|
|
|
AFTER_INIT_FUNCTION = Callable[[], Any]
|
|
|
|
_after_init_functions: list[AFTER_INIT_FUNCTION] = []
|
|
|
|
|
|
def after_init(func: AFTER_INIT_FUNCTION):
|
|
_after_init_functions.append(func)
|
|
|
|
|
|
def run_afterinit_functions(): # pragma: no cover
|
|
for f in _after_init_functions:
|
|
f()
|